复制代码 代码如下:
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
// Do work here.
}
复制代码 代码如下:
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
connection.Open();
// Do work here.
}
复制代码 代码如下:
using (OdbcConnection connection = new OdbcConnection(connectionString))
{
connection.Open();
// Do work here.
}
复制代码 代码如下:
using (OracleConnection connection = new OracleConnection(connectionString))
{
connection.Open();
// Do work here.
}
OracleConnection nwindConn = new OracleConnection("Data Source=MyOracleServer;Integrated Security=yes;");
nwindConn.Open();
复制代码 代码如下:
stringconStr=@"provider=microsoft.Jet.OleDb.4.0;datasource=d://accessData.mdb;uid=sa;pwd=dd";
复制代码 代码如下:
stringconStr=@"Server=bwj;database=demo;uid=sa;pwd=";
复制代码 代码如下:
stringconStr=@"Provider=MSDAORA.1;Password=pwd;UserID=user_name;Data Source=link_str"
新闻热点
疑难解答
图片精选