LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query help with DB Toolkit

All,

 

Could use your help. Labview 2009.

 

I am connecting to my SQL Server database (SQL 2005) using the DB Connectivity Toolkit. I'm trying to return the actual users name from the SQL server based on their employee number. The APP node returns the users employee number.  I seem to error out when I get to the Execute VI and I'm not sure why.

 

Any help will be greatly appreciated.

0 Kudos
Message 1 of 7
(2,973 Views)

silly prelimionary question:  Did you configure access to the database for the development PC?

0 Kudos
Message 2 of 7
(2,958 Views)

I have.

0 Kudos
Message 3 of 7
(2,954 Views)

The conversion from variant looks fishy, might it be there it genererates an error?

If you only want 1 name, i'd simply do an index array on the database answer, then the same Varitant to string.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 7
(2,953 Views)

You'd be correct on it generates the error on the Database Variant to Data VI.

 

I've made the changes and it now runs, but I return shapes instead of words now.

 

The column I'm looking for is the third column in my SQL table.

 

Sorry about the questions. Still learning. Smiley Sad

0 Kudos
Message 5 of 7
(2,944 Views)

This might help...

0 Kudos
Message 6 of 7
(2,940 Views)

After fetching the database you build an array.  Is it not already a 2D array?

Then you cast it to variant.  Was it not already variant?

Then you convert the "thing"/variant-thing to string.

 

You may have too many steps..

0 Kudos
Message 7 of 7
(2,921 Views)