Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Connections questions
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00248175
Message ID:
00248385
Views:
21
Josh,

Thanks for help (and Ian too). Two follow-up question perhaps you can help me with:

1 - on the Activity-Process Info screen - there doesn't seem to be a way to refresh when I add or drop conenctions. I have to reopen. Is that designed behavior?

2- Do I understand that SQL Server counts ALL connections from one machine (or at least one VFP app) as "one user" in its licensing scheme? If that's the case, then I really don;t need to worry about having several connections open right? (at least not for licensing reasons)

thanks,
Ken

>I see that Ian has answered most of your questions. I'll see if I can fill in the rest.
>
>>2) count total number of connections open (in VFP session)
>
>For views, you could loop through all the work areas and use CURSORGETPROP('ConnectHandle) to see how many different handles there are. I don't think there's any way to figure out what manually opened connections you have, but you should be keeping track of that anyway.
>
>>
>>3) see total # of connections on SQL Server?
>>
>
>In SQL 7.0 you can go into Enterprise Manager. Expand the server, then Management, then Current Activity. Click on Process Info to see all the open connections.
>
>>4) force a view to share a currently (manuall opened) connection ?
>>
>
>Views will share connections with each other, but you can't open a connection with SQLCONNECT() and then have a view share it. I find this very annoying but there doesn't seem to be a way around it. One thing you can do is get the user name and password from the user when the application starts. Put it in the connection you want to use using DBSETPROP(). Then open a view. Then remove the user/password from the connection. Now you can keep this view open as long as the application is running in order to hold its connection open. I usually get the view's connection handle and assign it to a property of my application object. Then I can use it with SQLEXEC() throughout the application. I also mark all of my views ShareConnection so they don't open any additional connections.
Ken B. Matson
GCom2 Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform