Jump to content

Error 505 at DB Tools Close Connection


Recommended Posts

Hi all, 

 

I have an error that doesn't affect the functionality of my program, so for the moment I'm just ignoring it, but anyway I would like to know what is its cause and how can I solve it, or if it's safe to ignore it.

 

I have a program that makes some tests and stores the data in some clusters, and then when the job is done it writes everything in a database. Then it asks if you want to start another job or end the program. Up to there everything works perfect. But if you choose to start another job without closing the program, after you complete it there's an error at the end of the database writing. The error is this:

 

Error 505 occurred at NI_Database_API.lvlib:DB Tools Close Connection.vi->Escritura DB.vi->Interfaz Principal.vi

 

Possible Reason: Open Command Object.

 
ADO Error: 0x000001F9
 

As you can see in the attached image, in my database writing subVI I only open connection, use two "Insert Data" blocks and then close connection. I don't have any command references to use the Free Object block, so I don't know what's wrong.

 

Thanks in advance for any help. 

 

post-51439-0-58583200-1409154427_thumb.p

Link to comment

Ouch, silly mistake, thanks for pointing it out. 

 

Finally I could solve the problem. I found out that the error 505 generates when there's an error in the operation and then in another iteration of the same operation a no-error overwrites the error. I used the shift registers in the for loop, and noticed that now another error showed, saying that I was writing a duplicate of a primary key. So I checked the array I was writing to the DB and in fact I had stored data from the previous operations that I already wrote in the DB. After fixing that the problem was solved.

 

Thanks! 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.