From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in Database Toolkit - freeing commands

I am pretty sure I have found a bug in the database toolkit.

 

When an 'insert' SQL command fails, the CMD Execute.vi returns an error.

The 'CMD Delete.vi' then doesn't correctly remove the command object from

the system.

(it removes it, but does not adjust the count because of the incoming

error)

 

A workaround like this causes the counting to be correct.

 

I have attached the modified VI

 

Can you put this fix in the next release?

 

Thanks.

0 Kudos
Message 1 of 4
(2,598 Views)

It appears that the whole toolkit should be revisited for its error handling.  I recently brought up a situation where an incoming error was being masked by an error generated by the toolkit.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=386728

 

 

0 Kudos
Message 2 of 4
(2,589 Views)

Hi Nils Gokemeijer!

 

Thank you very much for posting your work around!  Would it be possible for you to post the code that demonstrates the bug?  This would be very helpful for R&D.  The more basic the code the better- that way R&D can more easily isolate the issue.  Thanks!

 

Kristen H.

0 Kudos
Message 3 of 4
(2,554 Views)

Sure,

 

Look at the ExceltoDatabaseCore.vi. basically it tries to insert a record, and if it already exists it will do an update instead (with an optional clause such as 'where mykey='identifying key'  '

In that particular case, the first record counter will fail to decrease count.

 

-Nild

0 Kudos
Message 4 of 4
(2,545 Views)