![]() |
|
|
Published: Tuesday, July 06, 1999 We've all created DSN-less connection strings. There are basic parts to the connection string. If you are connecting to a SQL database, you need the UID, the PWD, the DATABASE, the DRIVER, the SERVER, and other optional information. If you're connecting to an Access database, you need the DRIVER, and the DBQ, and some other optional information.
There is a drawback to this approach. First, it's prone to human typos. If you mistype the DBQ, you're SOL; if you forgot to add the SERVER name for the SQL DSN-less connection, well, you're SOL. (Of course it's a quick fix, but we shouldn't be succeptible to making these silly errors.) There's a simple, foolproof, incredibly easy way to generate your connection strings. This tip, pointing out to me by longtime 4Guys visitor Volker S., is as simple as cutting and pasting. If you have ADO installed on your machine all you need to do is the following:
It's that easy!! Pretty neat, eh? No more silly typos!
Happy Programming!
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||