SqlConnection链接字符串的问题 sa登陆失败

这是修改后的!

public class DB
    {
        public static SqlConnection createConnection()
        {
            SqlConnection con = new SqlConnection("Data Source=SURCREAK\\SURCREAK;Initial Catalog=vote;Persist Security Info=True;User ID=sa;Password=xxx");
            return con;

        }
    }

这是之前错误的:

server=.;database=vote;uid=sa;pwd=xxx;

posted on 2011-09-20 21:03  酿皮  阅读(903)  评论(2)    收藏  举报

导航