LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure Control

This VI is throwing an error 91. To me, everything looks good. Can someone tell me why this does not work? TestData.zip is a Microsoft Access database. Place this database on your C:\ drive. I'm looking forward to reading your responses. Thanks!

 

I'm running LV 2016

 

Download All
0 Kudos
Message 11 of 16
(438 Views)

Hi Nathan,

 

error 91 is thrown by that VariantToData function and is not related to your case structure!

What kind of data do you expect from your database?

 

Btw. your VI should look more like this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 16
(425 Views)

Nathan@home wrote:

This VI is throwing an error 91. To me, everything looks good. Can someone tell me why this does not work? TestData.zip is a Microsoft Access database. Place this database on your C:\ drive. I'm looking forward to reading your responses. Thanks!

 

I'm running LV 2016

 


  1. Look up the error.  (you'll discover that it's thrown by the Variant to Data function).  You're using that function to convert a variant to a string.  The error is because the data coming in isn't a string.
  2. Probe the wire (or add indicator).
  3. Run the code again.  Check what kind of data is in the wire.

How you proceed from there depends on what you find out about the data.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 13 of 16
(422 Views)

Hi Gerd!

All data types in the Access database are Short Text. Thanks for cleaning up my layout. I always learn from how others arrange their nodes. There is no "string" type in Access. There are Short Text and Long Text types. Thoughts?  - Nathan

0 Kudos
Message 14 of 16
(393 Views)

Hi Paul!

Here's a pic of the probes. There is no data on the wire. I don't know why. I first thought that the query was bad, but, it looks ok. Why does the wire have no data?

-Nathan

Control Case Structure with DB.jpg

0 Kudos
Message 15 of 16
(385 Views)

Nathan@home wrote:

Hi Paul!

Here's a pic of the probes. There is no data on the wire. I don't know why. I first thought that the query was bad, but, it looks ok. Why does the wire have no data?

-Nathan

Control Case Structure with DB.jpg


Looks like the array of variants coming out of "DB Tools Select Data.vi" is empty; which implies that your query came up dry.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 16 of 16
(376 Views)