LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL CMD answer

Hi, I use Labview db toolkit, but don't show the query answer in front panel.

 

I use this query with "Execute Query VI" :

 

UPDATE dbo.trc_PCBA_Linky
SET WorkOrderName='Workorder',BoxID=123,Packing_Timestamp=GETDATE(),Packing_Result=1
where [Serial_PCBA]= 'ABCDEFG1234' AND [ICT_Result]=1 AND Packing_Result is null

if(@@ROWCOUNT=1)
PRINT 'Packed!'

 

I want to get back the query answer "Packed!" How can I get back the SQL PRINT answer? 

0 Kudos
Message 1 of 3
(2,697 Views)

Do you need to get back the SQL print command?

 

Why not have LabVIEW display the string "Packed" in an indicator if the function that is executing the SQL command returns without an error?

0 Kudos
Message 2 of 3
(2,670 Views)

if(@@ROWCOUNT=1)
PRINT 'Packed!'

 

- If it is not '1' SQL not drop an error.  

- When I want to use more IF state in sql command, it is returns more option/answer.

0 Kudos
Message 3 of 3
(2,653 Views)