|
-
August 31st, 2001, 06:30 AM
#1
Creating a DSN file at run-time.
I had to create a DSN to create a linked table in Access from SQLServer...AT RUN-TIME.
I found out from MSDN articles that it can be done by API calls..but guess what I did ?
I did it like this..
Open App.Path & "\thedsn.dsn" For Output As #13
Print #13, "[ODBC]"
Print #13, "DRIVER=SQL Server"
Print #13, "UID = sa;"
Print #13, "Database = Goldmine"
Print #13, "SERVER=(local)"
Print #13, "Description=Connection to Goldmine database"
Close #13
..and this works.
I want to know
"is this acceptable ?"
"is this the best method to create a DSN at run-time ?"
"are there any implications invilved in this ?"
Please comment..
Thanks in advance
Anand Sagar
[email protected]
-
August 31st, 2001, 06:38 AM
#2
Reg
I had to do this but i made a DSN in the registry. Look in HKEY_LOCAL_MACHINE\Software\ODBC for guidence, you should be albe to pick up whats needed then create a folder and the keys to make your DSN. I have some code if you want it. [email protected]
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
|