[求助]如何连接SQL数据库
string str ;str="server=localhost;database=text;UID=sa;PWD=sa;
SqlConnection con = new SqlConnection(str);
con.Open();
验证方式为混合模式
运行时总是出错:说无法登陆或数据库不存在.
2006-09-06 12:15
2006-09-06 12:47
还是不行啊
2006-09-06 13:26
2006-09-06 13:49
2006-09-07 13:02
楼上说的对,str="server..........那你少了个分号,还有就是,你的那个localhost,可以用"."来代替啊,还有就是localhost同(local)其实是一样的

2006-09-07 16:29
2006-09-11 15:03
2006-09-11 15:19
2006-09-12 10:05