CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    2

    SQL-Server Connection

    Hello there,
    Could you please help me?
    How to connect to an SQL-Server from VB6?
    I have made an application where I use Access and ADO, I connect using cn.Open "DSN=IDB".
    But if this application is going to run distributed and the database is going to be centralized in an SQL-Server, how do you code it, i'm sure my users cannot create a ODBC DSN, I would like them to just install and "run", this is why my app. should connect to the remote server by code!!
    Please any hints would be great!!!
    Thanx


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: SQL-Server Connection

    you can use a DSNless connection by modifying your connectstring like this.

    "Driver={SQL Server};Server=yourservernamegoeshere;DATABASE=yourdatabase"


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured