03-21-2016 06:57 AM
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.
03-21-2016 07:11 AM
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.?
03-21-2016 07:24 AM
Hi Sam,
Please see attached my vi.
Thanks for the quck response
03-21-2016 07:35 AM
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?
Also, did you know you can expand the index array function? It would make your code a lot neater!
03-21-2016 08:00 AM
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
03-21-2016 08:17 AM - edited 03-21-2016 08:17 AM
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.
03-21-2016 08:26 AM
Hello Sam
This is where the error occurs and it is in the VoltsAmps vi.
dont know what the error means cannot find it.
regards
Matt
03-21-2016 08:28 AM
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.
03-21-2016 08:29 AM
Hello Sam
Sorry please see below a bigger pic.
regards
Matt
03-21-2016 08:36 AM
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