LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC Auto Connection

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 ?

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 1 of 4
(3,892 Views)

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

0 Kudos
Message 2 of 4
(3,825 Views)

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

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 3 of 4
(3,804 Views)

Thank you both i will try it and update the result... Smiley Happy

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 4 of 4
(3,797 Views)