tryString strConn="Data Source=ROLI;UID=sa;PWD=rolima; Initial Catalog=pubs";

解决方案 »

  1.   

    in your code, you were using "Integrated Security=SSPI", that means, asp.net will try to access the database with ASPNET account which probably does not have permissions to access your database
      

  2.   

    行了,,行了,,行了,,太感谢了,,不知道说什么好,两天多了,我就不信我连不同,,多谢了大哥了,,不在跟前,要不就请你吃顿饭,,我刚开始学,,上来就连不上数据库,,你说我该怎么办,,现在好了,好了,,你看看执行结果吧,,当前访问的页面是/aspnet/CH7_1.ASPX
    Open 
    太感谢了,,哈哈,,
      

  3.   

    All about Connection string link :http://www.able-consulting.com/ADO_Conn.htm