LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database connectivity

Hello,

 

I am using Labview to connect to a Amazon Web Service Database which i have setup.

I have installed the ODBC drivers on Windows Machine and setup the connection in Administrative tools.

The connection tested out succesfully.

I have produced a vi which displays certain data.

The issue that i have is that i am wanting to sort out from that data certain data but for a particular site

I have a site drop down box on the vi and when i run the vi it displays the site name so i know i am connecting to the right area on the Database.

i then want to sort out from this site various bits of data and display them on the vi. The display is setup how a want it to look.

I have placed certain MySQL queries to request data that is in tables from the database.

Thesde command i have tested out on the AWS database and got the right information back.

For some reason labview is not displaying the data.

 

Pls could someone help and point me in the right direction.

0 Kudos
Message 1 of 21
(3,810 Views)

Post your code! It is very difficult to 'guess' where your problem is - are you returning the right data from the database? How are you displaying it etc.?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 21
(3,805 Views)

Hi Sam,

 

Please see attached my vi.

 

Thanks for the quck response

0 Kudos
Message 3 of 21
(3,799 Views)

Where in your VI are you having the problem? Is it giving you any errors? If you put a probe on the 2D array after you convert it from recordset data, does it show the right data?

 

A couple of things I noticed...

 

Here you are using 'delete from array'...did you mean to delete it (and use the deleted portion?), or did you mean to index out one column/row from the array?

2016-03-21_12-32-43.png

 

Also, did you know you can expand the index array function? It would make your code a lot neater!

2016-03-21_12-35-11.png

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 4 of 21
(3,791 Views)

Hi Sam,

 

i am wanting to pick out a number of columns and rows from the array.

ie time date volts per phase and amps per phase and total kwh these are to be displayed

When i put a probe on to any part of the vi it is not showing any data.

I am getting an error -2147217900 and that is in the true statement after the second MySQL Query onwards.

 

Thanks

Matt 

0 Kudos
Message 5 of 21
(3,770 Views)

Which VI generates the error and what is the message that comes with it? The error code is probably being generated by the database provider and there is normally a description that goes along with it.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 21
(3,757 Views)

Hello Sam

 

LabviewError.PNG

This is where the error occurs and it is in the VoltsAmps vi.

dont know what the error means cannot find it.

 

regards

Matt

0 Kudos
Message 7 of 21
(3,749 Views)

The image is too small - either unwire the error so it uses automatic error handling, or put down an error handler VI - it will give you a popup with the full error message.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 21
(3,744 Views)

Hello Sam

 

Sorry please see below a bigger pic.

 

LabviewError.PNG

 

regards

 

Matt

0 Kudos
Message 9 of 21
(3,739 Views)

Since it's the Execute query that generates the error i assume the question is somehow ill formed. Date, e.g. might be reserved and not allowed as column name. Try the query directly in the database before placing it in code.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 21
(3,726 Views)