正在加载图片...
DataAdapter的使用 属性 ∥连接字符串 string strCon=@"Data Source DataServer;Initial Catalog TestDB; Integrated Security True;"; ∥执行连接 SqlConnection sqlCon new SqlConnection(strCon); ∥查询数据表中的记录 string sltStr=@"Select No,Name,Grade from JBQK"; SqlCommand sqlCmd new SqlCommand(sltStr,sqlCon); SqlDataAdapter sda new SqlDataAdapter(sqICmd); DataSet ds new DataSet(); 20 20 DataAdapter的使用 ▪ 属性 // 连接字符串 string strCon =@"Data Source = DataServer; Initial Catalog = TestDB; Integrated Security = True;"; // 执行连接 SqlConnection sqlCon = new SqlConnection(strCon); // 查询数据表中的记录 string sltStr = @"Select No, Name, Grade from JBQK"; SqlCommand sqlCmd = new SqlCommand(sltStr, sqlCon); SqlDataAdapter sda = new SqlDataAdapter(sqlCmd); DataSet ds = new DataSet();
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有