LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with MS Access variant data

Hi,

I'm having a problem retrieving data from a MS Access table. The DB Variant to Data function is continuously giving an error. I am using the DB data select function to extract the data from the database. I'm attempting to read both text and number data; when attempting to read the text data the variant output is:

OLE Variant

Variant Type->
VT_BSTR
Value->

I also receive an error. Something like "incorrect input". The value in the variant seems to be correct, why am I receiving an error?

Thanks in advance.
0 Kudos
Message 1 of 5
(3,147 Views)
Did you get an error code or an error message? This would help us look for hits on the web. A little example would also help.

I found the following link that might be what you are looking for:

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=50650000000800000033280000&ECategory=LabVIEW.LabVIEW+General
0 Kudos
Message 2 of 5
(3,147 Views)
A little more information might help in solving this problem. What are you wiring to the type selector? Are you receiving this error at run-time? What is the error number you are receiving? Do you get this error when you cast variants to numerics? Please repsond and I will see if I can help you out.
0 Kudos
Message 3 of 5
(3,147 Views)
Hi,

Sure, I can provide some more information. I am wiring a numeric constant "0" in long integer representation to the DB Variant to Data function. The data I'm trying to get out of Access is long integer data. The error I'm receiving from Labview (I have a simple error handler wired at the end) is:

Error 1 occured at Incorrect function in Database Fetch.vi

Possible Reasons

LABVIEW: An Input Parameter is invalid

or

NI-488: Command requires GPIB controller to be controller in charge

I don't have a GPIB card in my machine. In this particular case I was trying to cast the variant to a numeric. I'm not sure if the error occured in real-time; I don't know what that means. I can tell you that I used the VI progress monitor
(light bulb) and the error is occuring at the DB Variant to Data function.

This is the output to the variant indicator:

OLE Variant

Variant Type ->VT_I4
Value ->1
0 Kudos
Message 4 of 5
(3,147 Views)
Thanks,

I did check out that link. It should work; it's doing exactly what I'm trying to do, but I'm not having success retrieving data with that vi either. I did respond to another fellow who's trying to help me out. I described the error in detail in that message.
0 Kudos
Message 5 of 5
(3,147 Views)