1,978
社区成员
发帖
与我相关
我的任务
分享
using System.Data.SqlClient;
SqlConnection conn = new SqlConnection("server=localhost\\YANGZUJIE;uid=sa;pwd=11000;database=mytest");
conn.Open();
string str1 = "select * from the_user ";//sql语句(insert雷同)
SqlCommand cmd = new SqlCommand(str1, conn);//语句执行的comman对象
SqlDataReader dr = cmd.ExecuteReader();//执行;