LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DB toolkit error

I am using DB toolkit.

When the attached vi running at odd time, it is ok. But when it run at even time, it will generate error as screenshot.

The related error SQL command is : SELECT DB_ID ('ming07_06_22') ---Check if the same name DB not exist  

The Error message is:

Error 1 occurred at " Conn getDataToModify.vi:1"

Possible reason(s):

Object 0x2222222 is not valid.

What I trying to do is:

1) Check if the same name DB not exist

2) Yes, then restore the DB from a backup file.

3) Finished usage, delete related user and DB (the work for other vi )

But if I type command in SQL DB directly, everytime it will work.

Any Suggestion?  Also, in the same vi, there is error when close the DB connection.

Message Edited by turbot on 06-25-2007 10:01 PM

Download All
0 Kudos
Message 1 of 3
(3,566 Views)
First of all, what do you mean by running at "odd time" and "even time"?

Second, it doesn't help to post code with no subvis and a locked diagram since we can't run the code to troubleshoot it.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(3,558 Views)

The most likely reason is that your connection is broken somewhere and what you are getting is essentially a non-existent connection error (which is why you get an error when you try to close it). I'm guessing this will also happen with other SQL queries.

This could be, for example, because you disconnected the network cable, or because you have a bad network, or because the computer with the DBMS on it was rebooted, but assuming that your odd times and even times means number of times, then the most likely explanation is that you are closing the connection yourself and not opening it again for the "even times". The basic solution would be not to close the connection and to check the validity of the connection before using it and if it throws an error, close it and open a new connection to the DB.


___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(3,553 Views)