vb 6 connection problem with sql 2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coolminded
    New Member
    • Mar 2007
    • 137

    vb 6 connection problem with sql 2005

    dear all,
    i used to connect vb6 with sql server 2000, it worked great.now i just connected vb6 with sqlserver 2005, but it generates the error.

    object variable or With block variable not set.

    i use the connection string

    conn.Open "Provider=SQLNC LI.1;Integrated Security=SSPI;P assword=pwd ;Persist Security Info=True;User ID=administrato r;Initial Catalog=dtbs;Da ta Source=192.168. 1.99


    what might be the problem?? please can any one figure it out?

    thanx in advance
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Please find the Connection strings for SQL Server 2005 here.

    The error seems to be more related to the code than connection string.

    Comment

    • coolminded
      New Member
      • Mar 2007
      • 137

      #3
      thanx for ur quick response.
      i just went through the site.

      but now i got next problem.
      now i connect the database in a network.
      the ip of the server is 192.168.1.100
      the name of the computer is comp1
      the database is dtbs

      i use the connection string :
      conn.Open "Provider=SQLOL EDB.1;Integrate d Security=SSPI;P assword=pwd ;Persist Security Info=True;User ID=administrato r;Initial Catalog=dtbs;Da ta Source=192.168. 1.100:\comp1\sq lexpress

      but now it shows the error:
      [DBNETLIB][ConnectionOpen (ParseConnectPa rams()).]Invalid connection

      how should i define the data source here.
      TIA

      Comment

      Working...