Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server 7 connections
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00254047
Message ID:
00254877
Views:
25
It does take a little time to connect but that time adds up if you keep connecting & disconnecting. I connect once at the beginning of the app and disconnect on shut down. I do that that the connections take up memory on the server and it might cause extra work for the server to allocate the resources everytime you connect & disconnect.

>I guess my main concern with connecting, then disconnecting was the time it took , but you may be right that it takes very little time, I'll have to test this tomorrow. But I also wonder what other benefits can be gained from connecting & disconnecting vs. connecting once & staying connected.
>Thanks.
>
>>Hi Mark,
>>
>>I use a single shared connection for all views and performance has been great. I'm running synchronously for these views (default).
>>
>>As far as SPT, I created two methods and a property in my framework to handle this.
>>
>>The first Method establishes the connection to the server and stores the connection handle to the connection property.
>>
>>The second Method disconnects.
>>
>>So when I run SPT I run the connection method, then use the connection handle in the SQLEXEC() and then close the connection using the disconnect method.
>>
>>Peformance has been excellent for this too, as it takes no time at all to connect and disconnect. The other advantage to doing it this way is if you ever change passwords, database names, etc... on the server you only need to go to one place to change the properties.
>>
>>Take Care
DLC
"Use the Right Tool for the Job!"
davidandcynthia@email.com
Previous
Reply
Map
View

Click here to load this message in the networking platform