.NET DATA Provider

xiaoxiao2021-03-06  22

2005-03-03 10:25:40

Like dream @ -01py

http://bulo.163.com/article/-01py-muwxhw.html

copy

comment

ASE .NET Data Provider MySQLDirect .NET Data Provider ODBC .NET Data Provider OLE DB .NET Data Provider Oracle .NET Data Provider - From Microsoft Oracle .NET Data Provider - From Oracle OraDirect .NET Data Provider PostgreSQLDirect .NET Data Provider SQL Server. Net Data Provider

Adaptive Server Enterprise (ASE) .NET DATA Provider Sybase.Data.Aseclient The ASE .NET DATA Provider IS AN

Add-on Component to the .NET 1.1 Framework That Allows You To Access A Sybase Adaptive Server Enterprise (ASE) Database.

Using C #

using Sybase.Data.AseClient; ... AseConnection oAseConn = new AseConnection (); oAseConn.ConnectionString = "Data Source = (local);" "Initial Catalog = myDatabaseName;" "User ID = myUsername;" "Password = mypassword "OASECONN.Open (); using vb.net

Imports System.Data.AseClient ... Dim oAseConn As AseConnection = New AseConnection () oAseConn.ConnectionString = "Data Source = (local);" & _ "Initial Catalog = myDatabaseName;" & _ "User ID = myUsername;" & _ "Password = mypassword" OASECONN.Open () for more information, see:

ASE User's Guide

MySQLDirect .NET DATA Provider Corelab.mysql The MySqldirect .NET DATA Provider IS AN

Add-on Component to The

.NET Framework That Allows you to access the mysql data using

Native MySQL NetWork Protocol or MySQL Client, WITHOUT GoING THROUGH

OLE DB OR ODBC.

Using C #

using CoreLab.MySql; MySqlConnection oMySqlConn = new MySqlConnection (); oMySqlConn.ConnectionString = "User ID = myUsername;" "Password = myPassword;" "Host = localhost;" "Port = 3306;" "Database = myDatabaseName " " Direct = true; " " " " compress = false; " " pooling = true; " " min pool size = 0; " " Max pool size = 100; " " CONNECTION LIETIME = 0 "; omysqlconn.open (); using vb.net

Imports CoreLab.MySqlDim oMySqlConn As MySqlConnection = New MySqlConnection () oMySqlConn.ConnectionString = "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 "omysqlconn.open () for more information, see: Corelab's MySqldirect .NET DATA Provider

ODBC .NET Data Provider System.Data.ODBC The Open Database Connectivity (ODBC) .NET Data Provider is an add-on component to the .NET Framework. It provides access to native ODBC drivers the same way the OLE DB .NET Data Provider Provides Access to Native Ole DB Providers.

Note: this technology is inclined in version 1.1 of the .net framework. You need Only

Download this, if you are running version 1.0.

For SQL Server ODBC Driver

'VB.NETImports System.Data.Odbc ... Dim oODBCConnection As OdbcConnectionDim sConnString As String = _ "Driver = {SQL Server};" & _ "Server = MySQLServerName;" & _ "Database = MyDatabaseName;" & _ "Uid = Myusername; "& _" pwd = mypassword "oodbcconnection = new odbc.odbcconnection (sconnstring) odbcconnection.open () for Oracle ODBC Driver

'VB.NETImports System.Data.Odbc ... Dim oODBCConnection As OdbcConnectionDim sConnString As String = _ "Driver = {Microsoft ODBC for Oracle};" & _ "Server = OracleServer.world;" & _ "Uid = myUsername;" & _ "PWD = mypassword" ooDbcconnection = new odbc.odbcconnection (sconnstring) odbcconnection.Open ()

For Access (JET) ODBC DRIVER

'Vb.netimports system.data.odbc ... Dim Oodbcconnection as odbcconnectiondim sconnstring as string = _ "driver = {Microsoft Access Driver (* .mdb)};" & _ "DBQ = C: /SOMEPath/mydb.mdb; "& _" Uid = admin; "& _" pwd = "odbcconnection = new odbc.odbcconnection (sconnstring) odbcconnection.Open ()

For Sybase System 11 ODBC Driver

'VB.NETImports System.Data.Odbc ... Dim oODBCConnection As OdbcConnectionDim sConnString As String = _ "Driver = {Sybase System 11};" & _ "SRVR = mySybaseServerName;" & _ "DB = myDatabaseName;" & _ " Uid = myusername; "& _" pwd = mypassword "ooDbcconnection = new odbcconnection (sconnstring) odbcconnection.open () for all Other ODBC Drivers

'VB.NETImports System.Data.Odbc ... Dim oODBCConnection As OdbcConnectionDim sConnString As String = "Dsn = myDsn;" & _ "Uid = myUsername;" & _ "Pwd = myPassword" oODBCConnection = New Odbc.OdbcConnection (sConnString) Oodbcconnection.open () 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 System.Data.OleDb The Microsoft .NET Framework Data Provider for OLE DB allow you to use native OLE DB providers (e.g. Microsoft.JET.OLEDB.4.0) through COM interop to enable data access.

The Microsoft .NET Framework Data Provider for Ole DB Is Included in Both The 1.0 and 1.1 Version of The .NET Framework.

For IBM AS / 400 OLE DB Provider

'VB.NETImports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _ "Provider = IBMDA400.DataSource.1;" & _ "Data source = myAS400DbName;" & _ "User Id = myUsername;" & _ "Password = mypassword" ooledbconnection = new oledb.oledbconnection (sconnstring) oledbconnection.open () for Jet Ole DB Provider

'Vb.netimports system.data.oledb ... Dimooledbconnection as oledbconnectiondim sconnstring as string = _ "provider = microsoft.jet.Oledb.4.0;" & _ "data source = c: /mypath/myjet.mdb;" & _ "User ID = admin;" & _ "Password =" ooledbconnection = new oledb.oledbconnection (sconnstring) oledbconnection.Open ()

For Oracle Ole DB Provider

'VB.NETImports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _ "Provider = OraOLEDB.Oracle;" & _ "Data Source = MyOracleDB;" & _ "User ID = myUsername;" & _ " Password = mypassword "ooledbconnection = new oledb.oledbconnection (sconnstring) oledbconnection.Open ()

For SQL Server Ole DB Provider

'VB.NETImports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _ "Provider = sqloledb;" & _ "Data Source = myServerName;" & _ "Initial Catalog = myDatabaseName;" & _ "User Id = MyuserName; "& _" Password = mypassword "ooledbconnection = new oledb.oledbconnection (sconnstring) oledbconnection.open () for

Sybase ASE OLE DB Provider

'VB.NETImports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _ "Provider = Sybase ASE OLE DB Provider;" & _ "Data Source = MyDataSourceName;" & _ "Server Name = MyServerName;" & _ "Database = MyDatabaseName;" & _ "User ID = myusername;" & _ "Password = mypassword" ooledbconnection = new oledb.oledbconnection (sconnstring) oledbconnection.open () 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 System.Data.OracleClient 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 .NET DATA Provider is include in Version 1.1 of the .net framework. You need Only

Download this, if you are running version 1.0.

Using C #:

using System.Data.OracleClient; OracleConnection oOracleConn = new OracleConnection (); oOracleConn.ConnectionString = "Data Source = Oracle8i;" "Integrated Security = SSPI"; oOracleConn.Open (); Using VB.NET:

Imports System.Data.OracleClientDim oOracleConn As OracleConnection = New OracleConnection () oOracleConn.ConnectionString = "Data Source = Oracle8i;" & _ "Integrated Security = SSPI"; oOracleConn.Open () 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 Oracle.DataAccess.Client The Oracle .NET Framework Data Provider from Oracle IS AN

Add-on Component to the .net framework.

Using C #

using Oracle.DataAccess.Client; ... OracleConnection oOracleConn = new OracleConnection (); oOracleConn.ConnectionString = "Data Source = MyOracleServerName;" "Integrated Security = SSPI"; oOracleConn.Open ();

Using VB.NET

Imports Oracle.DataAccess.Client ... Dim oOracleConn As OracleConnection = New OracleConnection () oOracleConn.ConnectionString = "Data Source = MyOracleServerName;" & _ "Integrated Security = SSPI"; oOracleConn.Open () For more information, see:

Oracle Data Provider for .NET

ORADIRECT .NET DATA Provider - From Corelab Corelab.Oracle The ORADIRECT .NET DATA Provider IS An Add-on Component To The .NET

Framework That Provides Access To An Oracle Database Using The Oracle

Call Interface (OCI) as provided by Oracle Client Software.

Using C #

using CoreLab.Oracle; OracleConnection oOracleConn = new OracleConnection (); oOracleConn.ConnectionString = "User ID = myUsername;" "Password = myPassword;" "Host = (local);" "Pooling = true;" "Min Pool size = 0; " " Max pool size = 100; " " connection lifetime = 0 "; oracleconn.open (); using vb.net

Imports CoreLab.OracleDim oOracleConn As OracleConnection = New OracleConnection () oOracleConn.ConnectionString = "User ID = myUsername;" & _ "Password = myPassword;" & _ "Host = (local);" & _ "Pooling = true;" & _ "MIN pool size = 0;" & _ "max pool size = 100;" & _ "connection lifetime = 0" oracleconn.open () for more information, see:

Oradirect .NET DATA Provider

MySQL .NET DATA Provider Eid.mysqlclient The MySQL .NET Native Provider IS An Add-on Component To The .NET Framework That Allows You To Access The MySQL Database THROUGH

The Native Protocol, WITHOUT GoING THROUGH OLE DB OR ODBC.

Using C #

using EID.MySqlClient; ... MySqlConnection oMySqlConn = new MySqlConnection (); oMySqlConn.ConnectionString = "Data Source = (local);" "Database = myDatabaseName;" "User ID = myUsername;" "Password = myPassword; " " Command logging = false "; omysqlconn.open (); using vb.net

Imports EID.MySqlClient ... Dim oMySqlConn As MySqlConnection = New MySqlConnection () oMySqlConn.ConnectionString = "Data Source = (local);" & _ "Database = myDatabaseName;" & _ "User ID = myUsername;" & _ "Password = Mypassword; "& _" Command logging = false "omysqlconn.open () for more information, see:

Eid's MySQL ADO.NET NATIVE PROVIDER

Postgresqldirect .NET DATA Provider Corelab.postgreSQL The PostgreSqldirect .NET DATA Provider is an add-on intronent to the

.NET Framework That Allows you to access the postgreSQL Database Using

Native Message-Based Protocol, WITHOUT GoING THROUGH OLE DB OR ODBC.

Using C #

using CoreLab.PostgreSql; PgSqlConnection oPgSqlConn = new PgSqlConnection (); oPgSqlConn.ConnectionString = "User ID = myUsername;" "Password = myPassword;" "Host = localhost;" "Port = 5432;" "Database = myDatabaseName ; "Pooling = true;" "MIN pool size = 0;" "Max pool size = 100;" "connection lifetime = 0"; opgsqlconn.open (); using vb.net

Imports CoreLab.PostgreSqlDim oPgSqlConn As PgSqlConnection = New PgSqlConnection () oPgSqlConn.ConnectionString = "User ID = myUsername;" & _ "Password = myPassword;" & _ "Host = localhost;" & _ "Port = 5432;" & _ " Database = MyDatabaseName; "& _" pooling = true; "& _" min pool size = 0; "& _" Max pool size = 100; "& _" Connection Lifetime = 0 "opgsqlconn () for more information, See:

Postgresqldirect .NET DATA Provider

SQL Server .NET DATA Provider System.Data.sqlclient The SQL Server .NET DATA Provide Allows You to Connect To A Microsoft SQL Server 7.0 OR 2000 Database. For Microsoft SQL Server 6.5 or Earlier, Use T

OLE DB .NET Data Provider with the "SQL Server OLE DB Provider" (SQLOLEDB) .Note: The SQL Server .NET Data Provider knows which data provider it is Hence the "provider =" part of the connection string is not needed..

Using C #:

using System.Data.SqlClient; ... SqlConnection oSQLConn = new SqlConnection (); oSQLConn.ConnectionString = "Data Source = (local);" "Initial Catalog = myDatabaseName;" "Integrated Security = SSPI"; oSQLConn.Open ();

Using VB.NET:

Imports System.Data.SqlClient ... Dim oSQLConn As SqlConnection = New SqlConnection () oSQLConn.ConnectionString = "Data Source = (local);" & _ "Initial Catalog = myDatabaseName;" & _ "Integrated Security = SSPI" oSQLConn. Open ()

IF Connection to a Remote Server (VIA IP Address):

Osqlconn.connectionstring = "NetWork Library = DBMSSOCN;" & _ "Data Source = xxx.xxx.xxx.xxx, 1433;" & _ "Initial Catalog = MyDatabaseName;" & _ "User ID = myusername;" & _ "PAS Sword = mypassword "where:

- "NetWork Library = DBMSSOCN" TELLS SQLCONNECTION TO USE TCP / IP

Q238949

- xxx.xxx.xxx.xxx is an ip address.

- 1433 Is The Default Port Number for SQL Server.

Q269882 and

Q287932

- you can also add "

Encrypt = yes "for

ENCRYPTION

For more information, see:

SqlConnection Class,

Q308656, AND

.NET DATA Providers

NOTE: Microsoft

SQLXML Managed Classes Exposed The FunctionAry Of Sqlxml Inside The Microsoft .NET Framework.to View Microsoft Kb Articles Related To Sqlclient,

Click Here

转载请注明原文地址:https://www.9cbs.com/read-41164.html

New Post(0)