LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Connection with database

Hi, I'm new to Labwindows development,
I need to make a connection from the database to the system that is under development, but I don't know how to do it, could someone help me?

0 Kudos
Message 1 of 12
(3,214 Views)

Connecting to a database is usually performed via the SQL Toolkit, which is included in CVI full version starting from 2013 release.

Here is a Knowledgebase article that addresses this scenario: Connect to a Custom Database Using the LabWindows™/CVI™ SQL Toolkit 



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 2 of 12
(3,178 Views)

I created the ODBC configuration and enter the DNS in Labwindows, but
 the error in the image has occurred.1.JPG

0 Kudos
Message 3 of 12
(3,174 Views)

Can you show us the complete code, including variable definitions?

Also, which OS are you running upon?



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 4 of 12
(3,138 Views)

I am starting the programming study and follow the example of the documentation to make the connection.

I have a database that has records entered to do the test, what I need is, enter an identification number and if that number exists in the database, a search is made and you will get the records that are in the database data and show it on the screen.

 

connection.JPGodbc.JPG

0 Kudos
Message 5 of 12
(3,110 Views)

Seems you are missing to add the main () function, so the compiler is interpreting all the lines as variable definitions and complains in line 25 that 'odbc' is already defined in line 19.

Additionally, in line 27 you are missing the parenthesis around the if condition.



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 6 of 12
(3,101 Views)

Hi, I followed the instructions you said, but this error happened.

 

If click continue printf is loaded but click in break the code stop work.

 

1.JPG2.JPG

0 Kudos
Message 7 of 12
(3,077 Views)

i also want answer bcoz i m also having problem like this. plz let me know if mcdvoice anyone have any solution. I have a database that has records entered to do the test i just want identification number.

0 Kudos
Message 8 of 12
(3,059 Views)

This error is due to you having used the 64-bit of ODBC administrator to create the DSN: since CVI is a 32-bit application you must use the 32-bit of this tool. See this KnowledgeBase article:

Error -2147467259 When Using SQL Toolkit or Database Connectivity Toolkit on Windows 7 64-bit 



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 9 of 12
(3,054 Views)

I don't understand why the error remains, I followed the instructions but it didn't work, I don't know what I'm doing wrong.

 

1.JPG

0 Kudos
Message 10 of 12
(3,011 Views)