c#中的dataset控件怎么用啊?
1个回答
展开全部
可用来进行数据绑定。
下面是一个例子:
string strCon = "Provider = SQLOLEDB.1 ; Persist Security Info
= False ; User ID = sa ; Initial Catalog = database1 ; Data
Source = server1 " ;
OleDbConnection myConn = new OleDbConnection ( strCon ) ;
myConn.Open ( ) ;
string strCom = " SELECT * FROM table1" ;
//创建一个 DataSet
下面是一个例子:
string strCon = "Provider = SQLOLEDB.1 ; Persist Security Info
= False ; User ID = sa ; Initial Catalog = database1 ; Data
Source = server1 " ;
OleDbConnection myConn = new OleDbConnection ( strCon ) ;
myConn.Open ( ) ;
string strCom = " SELECT * FROM table1" ;
//创建一个 DataSet
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询