Click to See Complete Forum and Search --> : SQL-Server Connection


INXS
July 22nd, 1999, 02:38 AM
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

Lothar Haensler
July 22nd, 1999, 02:44 AM
you can use a DSNless connection by modifying your connectstring like this.

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