(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))
(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))
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()
this one's from microsoft, the following are from oracle
this one works only with oracle 8i release 3 or later
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()
this one is used with einfodesigns dbprovider, an add-on to .net
c#:
using eid.mysqlclient;
mysqlconnection omysqlconn = new mysqlconnection();
omysqlconn.connectionstring = "my connectionstring";
omysqlconn.open();
vb.net:
imports eid.mysqlclient
dim omysqlconn as mysqlconnection = new mysqlconnection()
omysqlconn.connectionstring = "my connectionstring"
omysqlconn.open()
"hdr=yes;" indicates that the first row contains columnnames, not data
新闻热点
疑难解答