(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))
SqlConnection (.NET)
Standard Security:
"Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;"
- or - "Server=Aron1;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False"
(booth connection strings produces the same result)
Trusted Connection:
"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
- or - "Server=Aron1;Database=pubs;Trusted_Connection=True;"
(booth connection strings produces the same result)
(use serverName/instanceName as Data Source to use an specifik SQLServer instance, only SQLServer2000)
(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))
Declare the SqlConnection:
C#: using System.Data.SqlClient; SqlConnection oSQLConn = new SqlConnection(); oSQLConn.ConnectionString="my connectionstring"; oSQLConn.Open();
VB.NET: Imports System.Data.SqlClient Dim oSQLConn As SqlConnection = New SqlConnection() oSQLConn.ConnectionString="my connectionstring" oSQLConn.Open()
Data Shape
MS Data Shape "Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=Aron1;Initial Catalog=pubs;User ID=sa;Password=asdasd;"
This one works only with Oracle 8i release 3 or later
Declare the OracleConnection:
C#: using System.Data.OracleClient; OracleConnection oOracleConn = new OracleConnection(); oOracleConn.ConnectionString = "my connectionstring"; oOracleConn.Open();
VB.NET: Imports System.Data.OracleClient Dim oOracleConn As OracleConnection = New OracleConnection() oOracleConn.ConnectionString = "my connectionstring" oOracleConn.Open()
Core Labs OraDirect (.NET)
Standard: "User ID=scott; Password=tiger; Host=ora; Pooling=true; Min Pool Size=0;Max Pool Size=100; Connection Lifetime=0"
Data Shape
MS Data Shape: "Provider=MSDataShape.1;Persist Security Info=False;Data Provider=MSDAORA;Data Source=orac;user id=username;password=mypw"
C#: using eInfoDesigns.dbProvider.MySqlClient; MySqlConnection oMySqlConn = new MySqlConnection(); oMySqlConn.ConnectionString = "my connectionstring"; oMySqlConn.Open();
VB.NET: Imports eInfoDesigns.dbProvider.MySqlClient Dim oMySqlConn As MySqlConnection = New MySqlConnection() oMySqlConn.ConnectionString = "my connectionstring" oMySqlConn.Open()
"Provider=DB2OLEDB;Network Transport Library=TCPIP;Network Address=XXX.XXX.XXX.XXX;Initial Catalog=MyCtlg;Package Collection=MyPkgCol;Default Schema=Schema;User ID=MyUser;Password=MyPW"
APPC:
"Provider=DB2OLEDB;APPC Local LU Alias=MyAlias;APPC Remote LU Alias=MyRemote;Initial Catalog=MyCtlg;Package Collection=MyPkgCol;Default Schema=Schema;User ID=MyUser;Password=MyPW"
Note! The two double quota following the DSN parameter at the end are escaped quotas (VB syntax), you may have to change this to your language specific escape syntax. The empty DSN parameter is indeed critical as not including it will result in error 7778.
OLE DB
Adaptive Server Anywhere (ASA):
"Provider=ASAProv;Data source=myASA"
Adaptive Server Enterprise (ASE) with Data Source .IDS file:
"Provider=Sybase ASE OLE DB Provider; Data source=myASE"
Note that you must create a Data Source .IDS file using the Sybase Data Administrator. These .IDS files resemble ODBC DSNs.
Adaptive Server Enterprise (ASE):
"Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDBname;User Id=username;Password=password"
- some reports on problem using the above one, try the following as an alternative -
This one works only from Open Client 12.5 where the server port number feature works,燼llowing fully qualified connection strings to be used without defining燼ny .IDS Data Source files.