04-18-2009 11:30 AM
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.
04-18-2009 12:24 PM
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
04-20-2009 12:53 PM
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.
04-20-2009 02:45 PM
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