LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 4 条)
4,430 次查看

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 项奖励
2 条消息(共 4 条)
4,363 次查看

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 项奖励
3 条消息(共 4 条)
4,342 次查看

Thank you both i will try it and update the result... 高兴表情

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

0 项奖励
4 条消息(共 4 条)
4,335 次查看