LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect the database

Solved!
Go to solution

Hi all,

 

I am using labsql(and m quite new to it) and Mysql server 5.1.I wanted to know how to connect to the database without manually changing the dsn name from the administrative tools/ODBC driver 5.1. I want to install exe in multiple PC's and it would be of great help if I could do the connection directly though my Vi.

 

I went through many of the forums and came to know that "Provider=ProviderName; Data Source=DatabaseSource; Initial Catalog=DatabaseName; User ID=UserID; Password=Password" , should solve the problem.But where in my case I m still confused. The above connection string does not work fine with me.

 

Can anyone please help me out.

0 Kudos
Message 1 of 4
(2,456 Views)

I haven't used labsql, but in Database Connection kit you can a string constant with the information you posted rather directly. That string can be made by making a .udl file and opening it in e.g. notepad and stealing the text (or most of it)

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(2,450 Views)
''That string can be made by making a .udl file and opening it in e.g. notepad and stealing the text (or most of it)" Can u explain this more And to talk of the create connection vi in labsql also i can connect a string constant.
0 Kudos
Message 3 of 4
(2,439 Views)
Solution
Accepted by topic author saki

Have a look here, where I include a picture to show how to form a string constant to connect to the database. Some of the subsequent posts in that thread should also be helpful.

Good luck!

 

Ian

Message 4 of 4
(2,433 Views)