winfroms 数据库连接
winfroms 数据库连接
using System.Data.SqlClient;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Data.ProviderBase;
using System.Data.SqlTypes;
的connection 代码。。。。。
急!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
------解决方案--------------------连接本机的数据库
using System.Data.SqlClient;
Sql server 2005
SqlConnection con = new SqlConnection("server = localhost ;integrated security = True; database = 数据库名");
Sql server 2000
SqlConnection con = new SqlConnection("server = localhost ;uid = 'sa';pwd =''; database = 数据库名");
------解决方案--------------------你要实现什么操作?详细说明
------解决方案--------------------MSDN