LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2147467261 occurred at Database Variant To Data

HEllo!
 
I my vi, I import data from a MySqldatabase......the connection worked perfect and i could import all the data without problem until today.....I've started running the vi and this error has appear:
 
Error -2147467261 occurred at Database Variant To Data in Copia de connect_sql(2).vi->enfrontar 10-10(12,00).vi
This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input.
 
What happened?How can i solve this problem?Is a labview MySql database problem.
 
 
Thanks!
 
Larson
Message 1 of 7
(6,422 Views)

What is the datatype of the field that you are trying to convert? Also, what is the value of the specific item that you are converting? I have seen problems where if a field was empty (NULL) the varient coming back would be of a void datatype, which would not convert properly.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(6,418 Views)

 

Hello Mike!

I import from MySql a column of real number, there's no null values. The strange thing is that this vi had worked perfectly before......

If you are an database toolkit user i want to ask you another question about it....you know if there are some block, or the way to import only a cell from the database(e.g. column 1 row 2)? Is possible to import automaticly the last value writen in the database?

 

Thank you very much Mike!

 

Larson 

0 Kudos
Message 3 of 7
(6,413 Views)

The thing I would suggest is look at the exact value that you are cobverting when the error occurs and see if you can see anything unusual about it. In terms of your second question, there's no way to implement that level of granularity with the toolkit. The easiest solution is to either structure your query to return just the data you need, or parse the results in LV after you've read in all the data. To answer, your last question: there is no way to reliably read back the last thing written to the database. What is it that you are trying to do?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 7
(6,409 Views)
I have a table of a mysql database where (on-line) with another program (no labview) is stored the information of four variables second by second and the actual phase of the process. What i want to do is read only the last element of the phase column to know which is the actual phase.....when the process arrives to sedimentation phase i import the whole table, no before, no after. Do you mean what i want to do....now i import every second all the phase column( max. 4000 elements) and then with an index array i try the last one......but is the worst solution because the cpu is wprking at 100% at all time, and the program cannot run with normality.
 
Thanks for helping me!!, mike
 
Larson
0 Kudos
Message 5 of 7
(6,407 Views)
If I understand you, your application is storing 4 data values to the database once a second. What you want to be able to do is extract the last sample inserted. This is possible, depending upon the structure of the table you are inserting the data into. What fields are in the table (besides the four fields for the data variables) and what do they store? Hint: I am looking for a key column that will uniquely identify a specific test run, and a timestamp.
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(6,400 Views)
Good morning....
 
i think i've found the answer to my question...using the optional case wire from DB select data you only import the data which match with the real number or string that is wired. It runs correctly in this way.
 
Thanks for your replies.
 
Larson
0 Kudos
Message 7 of 7
(6,387 Views)