LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Database: Leave it connected or connect/disconnect every time?

Solved!
Go to solution

Hi,

 

The CVI database examples are great, everything needed was right there.

Now that my program works, I have a dilema:

 

I'm writing a small amount of data to a database on a network drive once every 10 minutes.

Is it better to connect once and write periodically, or to connect and disconnent each time?

 

Works either way and the coding is simple, but there must be some IT reason one way is better right?

 

Thanks,

Kevin

 

0 Kudos
Message 1 of 2
(2,664 Views)
Solution
Accepted by topic author KevinMac

Hi Kevin,

 

Since the database is located on a network drive, and since there is so much time in between each access instance, I would connect and disconnect to it each time you need to write.  If you choose to remain connected while the program is running, you run a higher risk of losing that network connection and therefore either losing your data or prematurely terminating the program.

 

Hope this helps!

 

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 2 of 2
(2,636 Views)