Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sharing Connection from TWO DBC
Message
From
02/04/2010 09:38:37
 
 
To
01/04/2010 21:15:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows NT
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01458440
Message ID:
01458506
Views:
51
Al,

Thanks for the reply. You are correct that I'm storing the connection string in the DBC. After some more experimenting, I found that there was an easy fix. Changing the 'connection string name' to be the same in both DBC's fixed the problem. The application is now making only one connection to the SQL server.

Robert


>At the lowest level, it may be worth checking that both SQL Server 6.5 and the database driver you're using support shared connections.

>It sounds like you are storing connection information in DBCs. Instead, you could manage connections programmatically yourself which would give you full control over establishing, sharing and using connection handles.

>Another possibility would be to create a third DBC on the fly, from the other two, that contains all of their information.

>The GenDBC tool could be useful for either merging two DBCs or getting code that you can tweak programmatically.

Al

>We are using an old MS SQL database (ver. 6.5) that is sensitive to resource taken up by "connections." Recently, I created a VFP9 application that contains two different DBC's. One DBC contains queries that are unique to the application and the other DBC contains queries that are general to many applications. Although I have each query set to "Share" in both DBC's, I just noticed that each DBC requires a connection to the SQL server. Is there anyway to get two DBC's to share the same connection? Also, I just noticed that the "name" of the connection in the two DBC's are slightly different. Would it make any difference if I renamed them the same name or is this an issue because each DBC establishes its own connection.
>
>I realize I can copy the queries from one DBC into the other DBC and then I would have all queries in just one DBC and thus get down to just one "shared connection." But, that would defeat the reason they were separted into two DBC's in the first place which was to keep a master DBC of common queries for multiple applications.

Robert Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform