Mark,
You don't need to create the DSN on the client machine, just call the driver with all the configuration needed. You will still have to distribute ODBC with your setup, but you won't have to worry about cumbersome DSN setup
Use this string instead of your DSN name:
cConnString = "DRIVER={SQL Server};SERVER=MY_SERVER;UID=sa;PWD='';DATABASE=MY_DATABASE"
It works the same and does not require a DSN name, you can also substitute DRIVER with any registered driver (oracle etc), you can find a list of all the drivers in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\OBCDINST.INI.
Substitute the {SQL Server} with any of those for access to that type of server!
BTW, I'm not going to type that cumbersome registry editing warning ;)
With a little playing around you'll get the hang of it and won't have to worry about setting up DSN or distributing your app.
HTH,
Ed
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement