帮忙改个代码!!!
命名空间“System.Configuration”中不存在类型或命名空间名称“ConfigurationManager”(是缺少程序集引用吗?)怎么解决
在vs2005中这段代码怎么改写
SqlConnection myconnection = new SqlConnection("Server=(Local);database=test;uid=sa;pwd=sa");
myconnection.ConnectionString =
System.Configuration.ConfigurationManager.ConnectionStrings["AttDownConnectionString"].ConnectionString;
SqlCommand cmd1 = new SqlCommand();
= "select count(QuestionId) from tblQuestion where QuestionId=4";
cmd1.Connection = myconnection;
myconnection.Open();
int count = (int)cmd1.ExecuteScalar();
myconnection.Close();
lable2.Text = (cmd1.ExecuteScalar()).ToString();
[[it] 本帖最后由 ljl8853 于 2008-6-19 14:46 编辑 [/it]]
[[it] 本帖最后由 ljl8853 于 2008-6-19 14:52 编辑 [/it]]