Database Connections

Top  Previous  Next

Before you can copy data from one database to another you need to set up a database connection for the source and target databases. This is done using the Edit Database Connections dialog by selecting the Options --> Edit Database Connections from the Menu

 

 

clip0001

Edit Database Connections Dialog

 

Adding A Connection

To add a new database connection do the following:

 

1.Click on the Add button
2.Enter a Connection Name
3.Select the Database Type
4.Select the Provider (this will default to the setting most appropriate to the Database Type)
5.Enter the connection string. For file based databases such as Access, Visual FoxPro and Vista you can use the button to open the file selection dialog. More information about connection strings can be found here
6.Click on the Test Connection button to test the connection is working
7.If the connection succeeds then click on the Save button to add the connection to the list of saved connections

 

Providers
SqlClient
Provider for connections to SQL Server.

Availability

Included with the .Net Framework

OleDb

Provider for connections to Access and Visual FoxPro.

Availability

Included with the .Net Framework

OracleClient

Provider for connections to Oracle. Also requires the installation of the Oracle Call Interface (OCI) on the client.

Availability

Included with the .Net Framework

MySql

Provider for connections to MySql.

Availability

Download from the MySql web site http://dev.mysql.com/downloads/connector/net

DB2

Provider for connections to DB2.  Also requires the installation of the DB2 client.

Availability

Download as part of the IBM DB2 Client http://www-306.ibm.com/software/data/db2/9/download.html

VistaDB

Provider for connections to VistaDB.

Availability

Download from the VistaDB web site

 

Pervasive

Provider for connections to Pervasive.

Availability

Download from the Pervasive web site

 

Firebird

Provider for connections to Firebird.

Availability

Download from the Firebird web site

Odbc

Connect to one of the supported databases using an ODBC DSN

Availability

Included with the .Net Framework

 

Connection Strings

SQL Server

Connection strings for SQL Server are assigned in one of two formats depending on whether you want to connect using Windows or SQL Server authentication.

Using Windows authentication

Server=ServerName;Database=DatabaseName;Trusted_Connection=true;

Using SQL Server authentication

Server=ServerName;Database=DatabaseName;UID=username;PWD=password;

 

Provider

SqlClient

Access

Data source property should specify the path to an Access MDB file

Example connection string

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\data\msjet\hr.mdb

Provider

OleDb

Oracle

Connection strings for Oracle are assigned in one of two formats depending on whether you want to connect using Windows or Oracle authentication. The Data Source refers to

Using Windows authentication

Example connection string

Data Source=HumanResources;Integrated Security=SSPI;

Using SQL Server authentication

Example connection string

Data Source=HumanResources;user id=userid;password=nwind;

Provider

OracleClient

MySql

Server=servername;Port=3306;Database=databasename;User ID=username;Password=password;

Provider

MySQL

DB2

Example connection string

Server=Servername;Database=DatabaseName;uid=username;pwd=password;CurrentSchema=schemaname;

Provider

DB2

Visual FoxPro

Connection requires the Visual FoxPro OleDb driver which can be downloaded from here

Example connection string

Provider=vfpoledb;data source=/data/vfp/northwind/northwind.dbc;

Provider

OleDb

VistaDB

Connection requires the Visual FoxPro OleDb driver which can be downloaded from here

Example connection string

Data Source=/data/vistadb/northwind.vdb3;

Provider

VistaDB

dBASE

Connection requires the MS JET OleDB driver (specifying DBASE in the Extended Properties property)

Example connection string

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\GoldMine\Demo;Extended Properties=DBASE IV;

Provider

OleDb

Pervasive

Connection requires the Pervasive .Net Data Provider

Example connection string

Server=ServerName;ServerDSN=DataSetName;

Provider

Pervasive

Firebird

Connection requires the Firebird .Net Data Provider

Example connection string

Server=ServerName;Database=C:\firebird\nwind\nwind.FDB;User ID=sysdba;Password=masterkey;

Provider

Firebird