LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to a database

Solved!
Go to solution

I want to connect to a data base that i ve created using mysql but the examples provided in sql toolkit in CVI uses DBConnect("DSN=CVI Samples"). I understood the what the DBConnect and DSN does but not "CVI samples". What should i do to connect to a separate database other than the example databases in CVI. In my case the database name is db1.

0 Kudos
Message 1 of 4
(3,446 Views)
Solution
Accepted by topic author proton029

Hello,

 

You will have to create your own DSN that points to your database. This link may help you. If you open the ODBC Administrator and go to "System DSN" you will be able to see an entry named "CVI SQL Samples". If you hit "Configure", you will see that it is linked to the samples.mdb database. Similar to that, the DSN you will add should link to your database.

 

Catalin

Message 2 of 4
(3,394 Views)

...with the precaution to use the 32-bit version of the ODBC administrator in case you are running a 64-bit release of the OS.

Since CVI is a 32-bit application, infact, it cannot access 64-bit DSNs. The 32-bit ODBC Administrator can be found in:

C:\Windows\SysWOW64\odbcad32.exe



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 4
(3,381 Views)

Thanks and it worked  🙂

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