LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner's guide to outputting data from Labview to MySQL

Solved!
Go to solution

Dear RobC,

I know this thread was created some time back. However could you please explain how you successfully did your connection to remote MySQL database ? It will help me a lot as I have to conenct to a MySQL database in a remote server and insert records as part of my project. The worst part for me is that I am using SQL for the first time. Thanks in advance!

Deepu. Using LabView7.0, 8.2.1

0 Kudos
Message 11 of 20
(6,288 Views)
Now that is a good tip!

How did you obtain your connection string, is there somewhere to copy it out of in the system DSN configuration?

I especially refer to you OPTION=785, what is the purpose of this?


0 Kudos
Message 12 of 20
(6,271 Views)
The connection strings are available at www.connectionstrings.com 
 
With regard to the OPTION value, take a look at http://dev.mysql.com/doc/refman/5.0/en/myodbc-configuration-connection-parameters.html. You can see what the value dictates.
 
 
0 Kudos
Message 13 of 20
(6,259 Views)

To RobC :

      Now, I'am facing the same puzzle you have met, would you please share the connectionstrings setting in labsql to connect to the remote MySQL server?

Message 14 of 20
(6,070 Views)
Hi Rob,

How is your project going? Are you all sorted now?

Regards,

Ian Colman
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 15 of 20
(6,030 Views)
I would be really interested in the reply to this....I'm looking at doing something similar. Is it possible to get the explanantion please?
0 Kudos
Message 16 of 20
(5,862 Views)
I am not sure if this will help you. Anyway I was able to get the connections and operations right. I just make use of Jeffrey Travis's code from http://jeffreytravis.com/lost/
You need to get the MySQL driver for Windows and instal in your system. Then, create DSN from the ODBC manager pointing the database in your server (if it is in a server) or your system.
Then use this DSN name in the connection string of your LabVIEW code to connect.
Hope it helps !
Message 17 of 20
(5,846 Views)
HI,
 
I have attached a image of my connection using LabSQL. The cluster parameters aI load from an INI file and this means I do not have to create the DSN in DSN Manager. Editing the INI file is all that is required.
 
With regard to the OPTIONS in the connections string. I initially did not have any options value at all and did not experience any problems. However, after much reading, I found several documents online suggesting the value that I use. If you read the explanation of the value at http://dev.mysql.com/doc/refman/5.0/en/myodbc-configuration-connection-parameters.html you will see we actually have selected.... (785):
    1 - The client can't handle that Connector/ODBC returns the real width of a column. This option was removed in 3.51.18
  16 - Don't prompt for questions even if driver would like to prompt.
256 - Disable the use of extended fetch (experimental).
512 - Pad CHAR columns to full column length.
0 Kudos
Message 18 of 20
(5,801 Views)

Hi Bill,

 

Can you explain in more details regarding

step 2.   Create a DSN using the mySQL ODBC driver and configure it to point to your network based server. (in WinXP: Control Panel->Administrator Tools->Data Sources (ODBC)).

 

Anyone please help me to guide me in details on how to setup a remote database for Labview?

 

Im using Labview 8.5 with database connectivity tools.

I've tried to insert and create table using MS Access and it works.

Now i wish to store my data in a remote database.

Can anyone guide me ? I dont know how to setup a MYSQL database

 

0 Kudos
Message 19 of 20
(4,196 Views)

Hi Ben

 

Compile Worker can be launched manually and it will ask to choose between local and remote compile server as normal if we launch the compiler configuration window.

 

 

Best Regards

Anders Rohde

Applications Engineer

National Instruments Denmark

0 Kudos
Message 20 of 20
(3,069 Views)