06-05-2011 12:29 AM
Hi ,
I have a question about the ODBC Connection.
As you know in order to use an Access data base you need to create a user DSN that will make the data base connection....
When I'm making a CVI software and later build a distribution of my soft I want to do the connection automatically in the install any idea's how can I do that ?
06-06-2011 01:29 AM
Hi,
There is function SQLConfigDataSource , but i do not have any experience with this function.
Instead i use SQLDriverConnect which do not use DSN name but connection string.
Example for FireBird Conection string:
"Driver={Firebird/InterBase(r) driver};Uid=UserName;Pwd=Password;DbName=c:\path\database.fdb";
good list of connection string is on http://www.connectionstrings.com/
i hope this help
06-07-2011 11:48 AM
Hi Kobi,
It looks like the function that OVR_CZ has mentioned, SQLConfigDataSource(), can be used to programmatically create an ODBC DSN source. I have attached a link to the Microsoft Support article that discusses how to use this function. I hope this helps, Kobi! Have a great day!
How To Configure ODBC Data Sources on the Fly
06-09-2011 12:32 AM
Thank you both i will try it and update the result...