Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConnect() Need some advice
Message
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00770255
Message ID:
00770909
Views:
14
>I (and every book I had read -- and even Microsoft) would disagree with keeping a connection open for the life of the application. A SQL connection is a valuable resource. Keeping it open is BIG trouble if you will be using MSDE.

That's fine, but that was not his question --

Question: "Would it be detrimental to Connect right before insert or update then immeditaly disconnect?". Just a note, this app updates SQL for another app. Most users update and read Fox tables.

IMO, yes it would be detrimental especially in a heads down data entry shop. In these instances it is not unreasonable to create the connection when a data entry form is opened or when the connection is actually first needed then disconnect when the form is destroyed or the app is closed. But, with respect to a VFP app in these situations, to create a connection, execute TABLEUPDATE(), then immediately disconnect is counter-productive.

Ultimately, the answer should be "it depends."
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform