Are you able to locate the source of the open command object that may be the cause of the error you receive?
I've encountered this error before. However, the best workaround I could find was to avoid the error cluser on the DB close connection.vi altogether. My vi still functioned properly but I had to follow up with R&D to tackle the bug-like behavior regarding the error.
Does your program work properly despite the error message?
According to my R&D its not DB close connection where error is generated. Please read the description here
I had been receiving error 505 also when Closing the Database Connection reference.
I’m calling the Create Parameterized Query.vi for a stored procedure, then the Execute Query.vi, and the Fetch Record Set Data.vi. I had the DB Tools Free Object.vi connected to the output of the Fetch.
I found that the Create Parameterized Query.vi and the Execute Query.vi output different Object references and both need to get freed separately. Now the error is gone.
This is an old thread so I am not sure it is still being followed. I would suggest you to create a new thread including your code to see if your question gets more visibility among users. You can even post this thread to give some more context, but definitely having more details about the error message you are getting would be quite useful.
How about posting your code. This is an error that is cause by faulty programming.