LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why need to use DB Tools Close Connection?

The question is, what is the difference betwen using DB Tools Close Connection Vi and not using them?
There are some big memory allocation if i don't close the connection? The connection don't automatically close when i stop the Vi?
0 Kudos
Message 1 of 9
(2,960 Views)
Yes, you'll get big memory allocations a.k.a. memory leaks.


The memory will be released when you close the process you are running in. LabVIEW if you are in development mode, the exe you're running if you are in an executable.


Regards,


Wiebe.
0 Kudos
Message 2 of 9
(2,951 Views)

My program is allways in a monitoring loop, and refresh the screen with some database parameters (Oracle Database with ODBC driver), my first approach is close the connections in the end of each loop, but this is a problem because the open connection takes too much time and isn't  suitable for the loop time, after that i remove the close connection, and it works "fine". "Fine" because when the application is running for some hours (or days) the application comes too slow (e.g. i press a button and the response takes 1 minute), and some times gives a database connection error.

My suspect is that this is related with the ODBC connection (driver) and the way as Labview manages them (open/close/retain connection/memory).

Do you have any suggestions about this, or how can i find what is the problem?

0 Kudos
Message 3 of 9
(2,942 Views)
Hello,

Which version of MySQL ODBC driver do you use ?  The problem may come from here, report to this link, try the procedure and let us know.

Regards

Richard Keromen

0 Kudos
Message 4 of 9
(2,918 Views)
Richard,
 
What you don't understand?
 
I'm saying ORACLE (not mysql) !
 
and I'm saying that now i'm not using anymore DB Tools Close Connection!
0 Kudos
Message 5 of 9
(2,913 Views)
Hello,

I'm sorry, i didn't see the latest post .... Do you have the VI, so that we could look at it and see what's wrong (or isn't)?

Regards

Message Edité par Richard K. le 05-29-2007 09:40 AM

Richard Keromen

0 Kudos
Message 6 of 9
(2,882 Views)

Isn' t proprely a Vi, but yes an application with a lot of vi /sub -vi's.  (The project has around 90 files)
 
Because that isn't easy to detect the problem.... 
 
...and because this needs the database, isn't possible to run without the database and its structure configured.

 

 

0 Kudos
Message 7 of 9
(2,873 Views)
Even more important than the memory leak isssue is that without the close, your data may not get written to the database. You see database transactions need to be committed to be made permanent. Many DBMS packages will rollback any changes that aren't commited when the connections aren't closed properly.

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 8 of 9
(2,844 Views)

Mike,

 

This isn't a problem because i'm almost only doing queries to the database, and is all in stored procedures at the databases side. (for speed performance).

0 Kudos
Message 9 of 9
(2,800 Views)