.
NET Data Providers
1 of 12
[Link]
Search
Tuesday, June 19, 2012
Site Navigation
..::
Technology
Connection Strings
.NET Data Providers
::..
Register Login
.NET Data Providers
Home
Personal
Technology
Connection Strings
.NET Data Providers
OLE DB Providers
Microsoft SQL Server
MySQL - From CoreLab
Data Link File (UDL)
ODBC DSN
ODBC Providers
ODBC DSN-Less
DataShape Provider
OLE DB Providers
ADO Recordset URL
MS Remote
Oracle Provider - From Microsoft
RDS
Data Type Mapping
Contact Me
Oracle Provider
- From Oracle
Oracle Provider
- From CoreLab
Postgre SQL Direct
- From CoreLab
Sybase ASE
VistaDB Provider
Microsoft SQL Server .NET Data Provider
([Link])
The Microsoft SQL Server .NET Data Provide allows you to connect to a Microsoft
SQL Server 7.0, 2000, and 2005 databases.
For Microsoft SQL Server 6.5 or earlier, use the OLE DB .NET Data Provider with
the SQL Server OLE DB
Provider (SQLOLEDB).
Using C#:
using [Link];
...
SqlConnection oSQLConn = new SqlConnection();
[Link] = "Data Source=(local);" +
"Initial Catalog=myDatabaseName;" +
"Integrated Security=SSPI";
//Or
// "Server=(local);" +
// "Database=myDatabaseName;" +
// "Trusted_Connection=Yes";
[Link]();
...
[Link]();
//
//
//
//
If you open the connection, then close the connection!
Otherwise the connection does not go back into the connection pool.
Note the SqlDataAdapter will open and close the connection for you
when calling it's Fill or Update methods. However if the connection
19/06/2012 17:53
.NET Data Providers
2 of 12
[Link]
// is already open, the SqlDataAdapter will leave it open.
Using [Link]:
Imports [Link]
...
Dim oSQLConn As SqlConnection = New SqlConnection()
[Link] = _
"Data Source=(local);" & _
"Initial Catalog=myDatabaseName;" & _
"Integrated Security=SSPI"
[Link]()
If connection to a remote server (via IP address):
[Link] = _
"Network Library=DBMSSOCN;" & _
"Data Source=[Link],1433;" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"
[Link]()
Where:
- "Network Library=DBMSSOCN" tells SqlClient to use TCP/IP
Q238949
- [Link] is an IP address of the remote SQL Server.
- 1433 is the port number for the remote SQL Server.
Q269882 and
Q287932
- You can also add "Encrypt=yes" for
encryption
For more information, see:
SqlConnection Class,
Q308656, and
.NET Data Providers
To view Microsoft KB articles related to SQLClient,
click here
Note: Microsoft
SQLXML Managed Classes exposes the functionality of SQLXML inside the Microsoft
.NET Framework.
19/06/2012 17:53
.NET Data Providers
3 of 12
[Link]
MySQLDirect .NET Data Provider - From CoreLab
([Link])
MySQLDirect .NET is data provider to direct access to MySQL database server for
the Microsoft .NET Framework and .NET Compact Framework. It is completely based
on ActiveX Data Objects for the .NET Framework ([Link]) technology. [Link]
provides
a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data,
XML, and application data.
MySQLDirect .NET data provider can be used in the same way as the SQL Server .NET
or the OLE DB .NET Data Provider. Data provider can access MySQL server either using
native MySQL network protocol directly or through MySQL client library. It allows
to create lightweight and fast applications working with MySQL.
Using C#
using [Link];
...
MySqlConnection oMySqlConn = new MySqlConnection();
[Link] = "User ID=myUsername;" +
"Password=myPassword;" +
"Host=localhost;" +
"Port=3306;" +
"Database=myDatabaseName;" +
"Direct=true;" +
"Protocol=TCP;" +
"Compress=false;" +
"Pooling=true;" +
"Min Pool Size=0;" +
"Max Pool Size=100;" +
"Connection Lifetime=0";
[Link]();
Using [Link]
Imports [Link]
...
Dim oMySqlConn As MySqlConnection = New MySqlConnection()
[Link] = _
"User ID=myUsername;" & _
"Password=myPassword;" & _
"Host=localhost;" & _
"Port=3306;" & _
"Database=myDatabaseName;" & _
"Direct=true;" & _
"Protocol=TCP;" & _
"Compress=false;" & _
"Pooling=true;" & _
"Min Pool Size=0;" & _
"Max Pool Size=100;" & _
"Connection Lifetime=0"
[Link]()
For more information, see: CoreLab's MySqlDirect
.NET Data Provider. Download
here. Support forms
19/06/2012 17:53
.NET Data Providers
4 of 12
[Link]
here.
ODBC .NET Data Provider ([Link])
The Open Database Connectivity (ODBC) .NET Data Provider provides access to native
ODBC drivers the same way the OLE DB .NET Data Provider provides access to native
OLE DB providers.
Note: This namespace, class, or member is supported only in version
1.1 of the .NET Framework.
For SQL Server ODBC Driver
' [Link] Imports [Link]
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUsername;" & _
"Pwd=MyPassword"
oODBCConnection = New [Link](sConnString)
[Link]()
For Oracle ODBC Driver
' [Link] Imports [Link]
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={Microsoft ODBC for Oracle};" & _
"Server=[Link];" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oODBCConnection = New [Link](sConnString)
[Link]()
For Access (JET) ODBC Driver
' [Link] Imports [Link]
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\somepath\[Link];"
oODBCConnection = New [Link](sConnString)
[Link]()
19/06/2012 17:53
.NET Data Providers
5 of 12
[Link]
For Sybase System 11 ODBC Driver
' [Link] Imports [Link]
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={Sybase System 11};" & _
"SRVR=mySybaseServerName;" & _
"DB=myDatabaseName;" & _
"UID=myUsername;" & _
"PWD=myPassword"
oODBCConnection = New OdbcConnection(sConnString)
[Link]()
For all other ODBC Drivers
' [Link] Imports [Link]
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Dsn=myDsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oODBCConnection = New [Link](sConnString)
[Link]()
For more information, see:
OdbcConnection Class and
.NET Data Providers.
To view Microsoft KB articles related to OdbcConnection,
click here.
OLE DB .NET Data Provider ([Link])
The Microsoft .NET Framework Data Provider for OLE DB allow you to use native OLE
DB providers (e.g. [Link].4.0) through COM interop to enable data access.
For IBM AS/400 OLE DB Provider
19/06/2012 17:53
.NET Data Providers
6 of 12
[Link]
' [Link] Imports [Link]
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=[Link].1;" & _
"Data source=myAS400DbName;" & _
"User Id=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New [Link](sConnString)
[Link]()
For JET OLE DB Provider
' [Link] Imports [Link]
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=[Link].4.0;" & _
"Data Source=C:\myPath\[Link];" & _
"User ID=Admin;" & _
"Password="
oOleDbConnection = New [Link](sConnString)
[Link]()
For Oracle OLE DB Provider
' [Link] Imports [Link]
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=[Link];" & _
"Data Source=MyOracleDB;" & _
"User ID=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New [Link](sConnString)
[Link]()
For SQL Server OLE DB Provider
' [Link] Imports [Link]
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=sqloledb;" & _
"Data Source=myServerName;" & _
"Initial Catalog=myDatabaseName;" & _
"User Id=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New [Link](sConnString)
[Link]()
For Sybase ASE OLE DB Provider
19/06/2012 17:53
.NET Data Providers
7 of 12
[Link]
' [Link] Imports [Link]
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=Sybase ASE OLE DB Provider;" & _
"Data Source=MyDataSourceName;" & _
"Server Name=MyServerName;" & _
"Database=MyDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"
oOleDbConnection = New [Link](sConnString)
[Link]()
For more information, see:
OleDbConnection Class and
.NET Data Providers.
To view Microsoft KB articles related to OleDbConnection,
click here.
Oracle .NET Data Provider - From Microsoft
([Link])
The Microsoft .NET Framework Data Provider for Oracle is an add-on component to
the .NET Framework 1.0 that provides access to an Oracle database using the Oracle
Call Interface (OCI) as provided by Oracle Client software. Oracle 8i Release 3
(8.1.7) Client or later must be installed for this provider to function correctly.
Note: This namespace, class, or member is supported only in version
1.1 of the .NET Framework.
Using C#:
using [Link];
...
OracleConnection oOracleConn = new OracleConnection();
[Link] = "Data Source=Oracle8i;" +
"Integrated Security=SSPI";
[Link]();
Using [Link]:
Imports [Link]
...
Dim oOracleConn As OracleConnection = New OracleConnection()
[Link] = "Data Source=Oracle8i;" & _
"Integrated Security=SSPI";
[Link]()
19/06/2012 17:53
.NET Data Providers
8 of 12
[Link]
For more information, see:
OracleConnection Class and
.NET Data Providers.
To view Microsoft KB articles related to OracleConnection,
click here.
Oracle .NET Data Provider - From Oracle
([Link])
The Oracle Data Provider for .NET ([Link]) features optimized data access to the
Oracle database from a .NET environment. [Link] allows developers to take advantage
of advanced Oracle database functionality, including Real Application Clusters,
XML DB, and advanced security. The data provider can be used from any .NET language,
including C# and Visual Basic .NET.
[Link] makes using Oracle from .NET more flexible, faster, and more stable. [Link]
includes many features not available from other .NET drivers, including Multiple
Active Result Sets (MARS), a native XML data type, the ability to bind array parameters,
and flexible LOB tuning. [Link] is designed for scalable enterprise Windows solutions
by providing full support for Unicode and local and distributed transactions. Distributed
transactions are supported using the Oracle Services for MTS.
Using C#
using [Link];
...
OracleConnection oOracleConn = new OracleConnection();
[Link] = "Data Source=MyOracleServerName;" +
"Integrated Security=SSPI";
[Link]();
Using [Link]
Imports [Link]
...
Dim oOracleConn As OracleConnection = New OracleConnection()
[Link] = _
"Data Source=MyOracleServerName;" & _
"Integrated Security=SSPI";
[Link]();
For more information, see:
Oracle Data Provider for .NET.
19/06/2012 17:53
.NET Data Providers
9 of 12
[Link]
OraDirect .NET Data Provider - From CoreLab ([Link])
OraDirect .NET is a data provider to direct access to Oracle database server for
the Microsoft .NET Framework and .NET Compact Framework. It is completely based
on ActiveX Data Objects for the .NET Framework ([Link]) technology. [Link]
provides
a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data,
XML, and application data.
OraDirect .NET data provider can be used in the same way as the SQL Server .NET
or the OLE DB .NET Data Provider. OraDirect .NET can access Oracle server using
Oracle Call Interface (OCI) or through TCP/IP directly.
Using C#
using [Link];
...
OracleConnection oOracleConn = new OracleConnection();
[Link] = "User ID=myUsername;" +
"Password=myPassword;" +
"Host=(local);" +
"Pooling=true;" +
"Min Pool Size=0;" +
"Max Pool Size=100;" +
"Connection Lifetime=0";
[Link]();
Using [Link]
Imports [Link]
...
Dim oOracleConn As OracleConnection = New OracleConnection()
[Link] = "User ID=myUsername;" & _
"Password=myPassword;" & _
"Host=(local);" & _
"Pooling=true;" & _
"Min Pool Size=0;" & _
"Max Pool Size=100;" & _
"Connection Lifetime=0"
[Link]()
For more information, see: OraDirect .NET Data Provider.
Download here. id="dnn_ctr413_HtmlModule_HtmlHolder0"> Support forms
here.
PostgreSQLDirect .NET Data Provider - From CoreLab
([Link])
19/06/2012 17:53
.NET Data Providers
10 of 12
[Link]
PostgreSQLDirect .NET is data provider to direct access to PostgreSQL database for
the Microsoft .NET Framework and .NET Compact Framework. It completely based on
ActiveX Data Objects for the .NET Framework ([Link]) technology. [Link] provides
a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data,
XML, and application data.
PostgreSQLDirect .NET data provider can be used in the same way as the SQL Server
.NET or the OLE DB .NET Data Provider.
Using C#
using [Link];
...
PgSqlConnection oPgSqlConn = new PgSqlConnection();
[Link] = "User ID=myUsername;" +
"Password=myPassword;" +
"Host=localhost;" +
"Port=5432;" +
"Database=myDatabaseName;" +
"Pooling=true;" +
"Min Pool Size=0;" +
"Max Pool Size=100;" +
"Connection Lifetime=0";
[Link]();
Using [Link]
Imports [Link]
...
Dim oPgSqlConn As PgSqlConnection = New PgSqlConnection()
[Link] = "User ID=myUsername;" & _
"Password=myPassword;" & _
"Host=localhost;" & _
"Port=5432;" & _
"Database=myDatabaseName;" & _
"Pooling=true;" & _
"Min Pool Size=0;" & _
"Max Pool Size=100;" & _
"Connection Lifetime=0"
[Link]()
For more information, see: PostgreSQLDirect
.NET Data Provider. Download
here. Support forms
here.
Sybase Adaptive Server (ASE) Enterprise .NET Data Provider (
name="AseClientManagedProvider">[Link])
The ASE Enterprise .NET Data Provider is an
add-on component to the .NET Framework that allows you to access a Sybase
Adaptive Server Enterprise (ASE) database.
19/06/2012 17:53
.NET Data Providers
11 of 12
[Link]
Using C#
using [Link];
...
AseConnection oAseConn = new AseConnection();
[Link] = "Data Source=(local);" +
"Initial Catalog=myDatabaseName;" +
"User ID=myUsername;" +
"Password=myPassword"
[Link]();
Using [Link]
Imports [Link]
...
Dim oAseConn As AseConnection = New AseConnection()
[Link] = "Data Source=(local);" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"
[Link]()
For more information, see:
ASE User's Guide.
VistaDB ([Link])
The VistaDB
Provider allows you to access a VistaDB
database.
Using C#
using [Link];
...
string connectionString = @"Data Source = C:\VistaDB.vdb3;
Open Mode = ExclusiveReadWrite";
VistaDBConnection connection = new VistaDBConnection(connectionString);
[Link]();
Using [Link]
Imports [Link]
...
Dim vistaDBConnection As VistaDBConnection = New VistaDBConnection()
19/06/2012 17:53
.NET Data Providers
12 of 12
[Link]
[Link] = @"Data Source = C:\VistaDB.vdb3;
Open Mode = ExclusiveReadWrite";
[Link]()
For more information, see:
VistaDB On-line Help.
Copyright 2005 [Link]
Terms Of Use Privacy Statement
19/06/2012 17:53