LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 91 variant to string

Solved!
Go to solution

Hi, 

I am new to Labview and had been trying to perform a simple database(MySQL) query. Although so far have been unsuccessful at this. Can anyone tell me what possibly i have been doing wrong here?

query.jpg 

0 Kudos
Message 1 of 3
(4,304 Views)

 


nik_s wrote: 

I am new to Labview ...


 

 

Sorry, I am not familiar with the database toolkit, so I cannot really tell what's going on (especially without seeing actual code instead of just an image).

 

Error 91 means: "The data type of the variant is not compatible with the data type wired to the type input".

 

Why don't you place a probe on the variant wire entering the function to identify what type it actually contains?

 

Still, there are some glaring coding mistakes and some cosmetic issues that you might want to address:

 

 

  • Two "index array" in a row are never needed. Simply wire both indices at the first one to get a single element of a 2D array.
  • The outer sequence frame does not seem to have any purpose. Why is it cluttering the diagram?
  • Why the inner while loop??? It seems to do the same procedure millions of times per second, operating on the same input and producing the same output, consuming 100% of the CPU power in the process. These calculations needs to be done exactly once (and whenever the data actually changes). Delete the while loop!
  • Try to avoid hidden wires, overlapping objects, and wires going right-to-left (except for code involving feedback nodes).

Message Edited by altenbach on 05-23-2010 09:16 AM
0 Kudos
Message 2 of 3
(4,289 Views)
Solution
Accepted by topic author nik_s

Now i have tried to neaten up the block diagram.........all i wanted to do was to execute this query " Select name from labview where username='nik91uee'"

The query is working fine now. The problem was due to no match found( Null error ). The error message generated, however, was misleading. It has now been resolved. :smileyhappy:

 

 

query2.jpg

Message Edited by nik_s on 05-23-2010 11:58 AM
0 Kudos
Message 3 of 3
(4,275 Views)