|
-
Jun 12th, 2000, 12:15 PM
#1
Thread Starter
Hyperactive Member
I have setup a system DSN (have the server IP address, DB Name etc) and used in the ADO connection
ADO.Open "DSN=xxx",
If the user do not have this DSN installed, then it cannot be run.
My question is :
How should I change the statement, so that I can hard code the IP address, DB name etc in the ADO.Open statement
Thanks for any hint
-
Jun 12th, 2000, 04:13 PM
#2
Frenzied Member
ADO.Open "Provider=[provider name];Driver={driver name};Server=[server];Database=[database];Uid=[userid];Pwd=[password];"
eg; for a SQL server database
ADO.Open "Provider=SQLOLEDB;Driver={SQL Server};Server=MYSERVER;Database=MYDB;Uid=SA;Pwd=;"
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Jun 13th, 2000, 05:40 AM
#3
New Member
DSN/ADO Connection string
It may seem a little obvious, but as an addition to to the previous post, you can set up an 'Options' form where the server ip etc. is set by the user. Alternatively use the registry, or even a remote path. Just a couple of idea to make the program more flexible.
Matt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|