LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No error when updating a field in a record that does not exist.

When I attempt to update a field in an oracle database and the record that I am trying to update does not exist, I do not get an error indication from the execute sql vi. Why?

Any suggestions on how to verify if a record has been successfully updated?
0 Kudos
Message 1 of 3
(2,524 Views)
When I talk about how database interactions work, I usually use analogies to how instrument control works. If you have an instrument and use the VISA Write to send a string to the device, the Write returns no error if the command string was correctly written to the instrument. The actual command might be completely wrong for that instrument, but the VISA function did transfer the information correctly. The same works for the SQL Execute VI. As long as the SQL statement uses the correct syntax, the Execute returns without an error. However, that doesn't mean the SQL statement performed the operation you wanted it to.

If you want to verify the information, do a query of the same record you just updated and compare the values. If they are different, the operation didn't complete correctly.

Also, if you aren't already doing so, I highly recommend using the drivers from Oracle rather than the ones written by Microsoft for Oracle. The MS drivers don't contain as much error checking or as many features as the Oracle ones do.
Message 2 of 3
(2,503 Views)
Thanks Crystal!

You are confirming what we were thinking.

By the way we are using the Oracle driver.
0 Kudos
Message 3 of 3
(2,496 Views)