我用c# 向sql server2005中插入数据 然后保存 这么写为什么不行啊 怎么改 请高人指点
stringconnstr="DataSource=.\\SQLEXPRESS;InitialCatalog=Table1;IntegratedSecurity=true...
string connstr = "Data Source=.\\SQLEXPRESS;Initial Catalog=Table1;Integrated Security=true";
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
string sql = "insert into Table_1(c_Id) values(5678 )";
SqlCommand cmd = new SqlCommand(sql, conn);
conn.Close(); 展开
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
string sql = "insert into Table_1(c_Id) values(5678 )";
SqlCommand cmd = new SqlCommand(sql, conn);
conn.Close(); 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询