LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

configure ODBC

Hei,

 

I want to be able to distribute my application that use a DB (SQL server or Access DB). I want to avoid to configure ODBC Data Source Administator  on each machine where i install the new SW.

 

I know that in Labview word it is possible  to create some Microsoft Data Link File (UDL) to connect to DB. Is there any thing similar in CVI ???

 

 

Any idea ??

 

Lionel.

 

 

 

  

0 Kudos
Message 1 of 6
(4,976 Views)

configure ODBC

Hei,

 

I want to be able to distribute my application that use a DB (SQL server or Access DB). I want to avoid to configure ODBC Data Source Administator  on each machine where i install the new SW.

 

I know that in Labview word it is possible  to create some Microsoft Data Link File (UDL) to connect to DB. Is there any thing similar in CVI ???

 

 

Still no idea ??

 

Lionel.

 

0 Kudos
Message 2 of 6
(4,911 Views)

Hi Lionel,

 

Are you using the SQL toolkit?

This forumpost should give you an answer to your question. 

 

Regards,

Bas

0 Kudos
Message 3 of 6
(4,786 Views)

Err.. that forum post appears to be private to NI applications engineers. Ordinary users like me get the following:

 

Access Denied

Sorry, you do not have sufficient privileges for that action.

Please click the Back button on your browser.

 

Any chance of a public posting?

0 Kudos
Message 4 of 6
(4,768 Views)

Hi,

 

Sorry, appears to be an internal link. Here is the quote. 

"There is not a CVI function that takes a UDL file as a parameter as the LabVIEW toolkit does, but the CVI SQL toolkit does have a function that takes a connection string.  According to this website (http://www.connectionstrings.com/udl) a valid connection string is "File Name=c:\myDataLinkFile.udl;".  If you use one of the SQL Toolkit examples and use that string (pointing to your UDL file) as the connection string, does it connect to the database?"

 

Let me know if it helps. 

 

Regards,

Bas

0 Kudos
Message 5 of 6
(4,760 Views)

Hi,

 

I have tried your suggestion BasvanDijke but it doesn t seem to  work....

 

But  i found an another by first modifing the dsn file under:

 

c:\Program Files (x86)\National Instruments\Shared\CVI\redist\x86\sqldistsupp.dsn

And second executing it with (LaunchExecutableEx)

 

c:\Program Files (x86)\National Instruments\Shared\CVI\redist\x86\sqldistsupp.exe

 

Then it automaticly update ODBC without manual setting .

 

Best regards.

 

Lionel.

0 Kudos
Message 6 of 6
(4,193 Views)