LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview, database ODBC connection error 2147467259

Solved!
Go to solution

Hi all,

I have a database in MySql that I need to populate data to. I am using Labview 2015 32bit to parse data from csvs and populate relevant tables in my sql.

I need to use ODBC. 

I keep running into this error, can anyone tell me why I get this error and how I would solve it?

Please find a screen shot attached.

 

* I have tried reinstalling Labview/Mysql

* Tried re-setting up my ODBC user DSN

* Installed SP1 for windows 10

 

Thank you!

0 Kudos
Message 1 of 4
(5,368 Views)

Are you sure that your DSN is setup in the 32bit ODBC client?

How does your connectionstring look like? 

Could you use a full connectionstring and not DSN? 

Message 2 of 4
(5,346 Views)
Solution
Accepted by Deja_Labvú

you need to setup up your connection string correctly.

There are many ways to do this with ODBC, (my personal preferred method is with a DSN file.)

You should be looking at the hex error code in the error return (0x800004005) and searching the wider web for this in relation to SQL connection error codes.

My initial analysis from reading the error message is:

 

1) your connection string is certainly wrong inside your "password VI" - or whatever you called it (I only opened the snippet in paint).

2) you may not have configured/ installed any Database drivers on your PC - open the "ODBC Data sources" panel on your machine and ensure you have configured the driver whose name you are referencing in your connection string.

3) you may not have correctly specified the database server

4) you may not have correctly specified the database

 

See also:

https://www.connectionstrings.com/sql-server/

https://www.w3schools.com/sql/

for more useful info if you get stuck with the native LabVIEW SQL functions - it helps to understand and create more complex arguments.

 

James

 

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 3 of 4
(5,344 Views)

I feel very silly,

It was an issue with my connection string.

Thanks very much, the links provided are useful too!

0 Kudos
Message 4 of 4
(5,326 Views)