Overview of the Connection Properties

Feature Data Objects API

 
Overview of the Connection Properties
 
 
 

The simplest case is connecting to a file-based data store. You create a DSN for the file as described in the following topics for MS Access and Excel, set the DataSourceName connection property to that DSN and then connect. Alternatively, you can just set the DSN parameter in the ConnectionString connection property, for example, DSN=ExcelDSN;Uid=;Pwd;.

The more complicated cases concern connection to an RDBMS-based provider.

When you use the Windows administrative tool to configure the DSN for an Oracle connection, you must define a Data Source Name and a TNS Service Name. You can optionally define a User ID. In the event that you do not define a User ID when configuring the DSN, you can connect by either setting the DataSourceName, UserId, and Password connection properties or by setting the DSN, Uid, and Pwd parameters in the ConnectionString connection property. In the event that you did define a User ID as part of the DSN, can connect by either setting the DataSourceName and Password connection properties or by setting the DSN and Pwd parameters in the ConnectionString connection property. The User ID defined in the DSN or the user name value defined in the connection property is used as the default schema for the session; that is, you will see tables from that schema.

When you use the Windows administrative tool to configure the DSN for a MySQL connection, you must define the Data Source Name, the Server, and the Database. Before connecting you must define the DataSourceName, the UserId, and Password connection properties. Alternatively, you must define the DSN, Uid, and Pwd parameters in the ConnectionString connection property.

When you use the Windows administrative tool to configure the DSN for a SQL Server connection, you must define the Name and Server. The default authentication is to use the Windows account name and password. You can change the default database from master to one of your own. Before connecting you must define the DataSourceName connection property.