Microsoft data odbc reference




















There are two types of machine data sources — user and system. User data sources can be used only by the current user and are visible only to that user. System data sources can be used by all users on a computer and are visible to all users on the computer and system-wide services.

A machine data source is especially useful when you want to provide added security, because only users who are logged on can view a machine data source and it cannot be copied by a remote user to another computer.

File data sources also called DSN files store connection information in a text file, not the Windows registry, and are generally more flexible to use than machine data sources. For example you can copy a file data source to any computer that has the correct ODBC driver so that your application can rely on consistent and accurate connection information to all the computers it uses.

Or you can place the file data source on a single server, share it between many computers on the network, and easily maintain the connection information in one location. A file data source can also be unshareable. An unshareable file data source is contained on a single computer and points to a machine data source. You can use unshareable file data sources to access existing machine data sources from file data sources.

In a module, you can define a formatted connect string that specifies connection information. A connect string passes the connection information directly to the ODBC Driver Manager, and it helps simplify your application by removing the requirement that a system administrator or user first create a DSN before you use the database.

Before proceeding, obtain and install the appropriate ODBC driver for the data source to which you want to connect. Note: You must be a member of the Administrators group on your local machine in order to add or configure an ODBC data source. Select the driver that you want to use, and then click Finish or Next. If the driver you want is not listed, contact the administrator of the database you are connecting to for information about how to obtain the correct driver.

Data Source Example. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page. Exceptions thrown by Open will be communicated via the returned Task Exception property. Do not invoke other methods and properties of the DbConnection object until the returned Task is complete. Indicates that the ODBC Driver Manager environment handle can be released when the last underlying connection is released.

Returns a String containing the name of the Component , if any. This method should not be overridden. Occurs when the component is disposed by a call to the Dispose method. For a description of this member, see Clone. This API supports the product infrastructure and is not intended to be used directly from your code.

Creates and returns a DbCommand object that is associated with the current connection. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Odbc Connection Class Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System. Odbc Assembly: System. Represents an open connection to a data source.

Note To deploy high-performance applications, you frequently must use connection pooling. In this article. OdbcConnection String. Inherited from DbConnection.

Gets a value indicating whether the component can raise an event. Inherited from Component. Gets the name of the current database or the database to be used after a connection is opened. Gets the name of the ODBC driver specified for the current connection. Gets a string that contains the version of the server to which the client is connected.

BeginDbTransaction IsolationLevel. When overridden in a derived class, starts a database transaction. Asynchronously starts a database transaction. BeginTransaction IsolationLevel. BeginTransactionAsync CancellationToken. Asynchronously begins a database transaction. ChangeDatabase String. Asynchronously changes the current database for an open connection. Asynchronously closes the connection to the database. CreateObjRef Type. Inherited from MarshalByRefObject. Dispose Boolean.

Asynchronously diposes the connection object. EnlistDistributedTransaction ITransaction.



0コメント

  • 1000 / 1000