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]