VB.Net-Database Connection Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeenajos
    New Member
    • Oct 2007
    • 71

    VB.Net-Database Connection Error

    Hi all,
    Im new to .net. When i tried to connect database using the below code an error came as Instance Failure. Pls Help Me.

    con = New SqlConnection(" Data source=.\\SQLEX PRESS;AttachDbF ilename=\C:\Pro gram Files\Microsoft SQL Server\MSSQL.1\ MSSQL\Data\Clas sif.mdf\;Integr ated Security=True;U ser Instance=True")

    Thank U
    Jeen
  • aliasruel
    New Member
    • Sep 2007
    • 73

    #2
    Hi,

    try to drag and drop a sqldatasource in you webform and then do the wizards of connecting to the datasource...
    copy the connection string once you're done.

    regards,
    ruel





    Originally posted by jeenajos
    Hi all,
    Im new to .net. When i tried to connect database using the below code an error came as Instance Failure. Pls Help Me.

    con = New SqlConnection(" Data source=.\\SQLEX PRESS;AttachDbF ilename=\C:\Pro gram Files\Microsoft SQL Server\MSSQL.1\ MSSQL\Data\Clas sif.mdf\;Integr ated Security=True;U ser Instance=True")

    Thank U
    Jeen

    Comment

    • jeenajos
      New Member
      • Oct 2007
      • 71

      #3
      Thanks for ur reply. But i have to do write as code.

      jeen

      Comment

      • jeenajos
        New Member
        • Oct 2007
        • 71

        #4
        Thanks that my problem is solved

        Comment

        Working...