StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Close SQL Connections?
Close SQL Connections?
Post Reply
Like
0
Close SQL Connections?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Trent Taylor
Trent Taylor
posted 13 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
Perfect. Glad you got it going.
Reply
Like
0
Chris Diesel
Chris Diesel
posted 13 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Users
Posts: 74,
Visits: 300
Thanks for the help. What ended up working was the SqlConnection.ClearAllPools() just prior to disconnecting the VPN.
Reply
Like
0
Trent Taylor
Trent Taylor
posted 13 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
It depends on how you are managing your connections. If you are using a BO, then the connection is never kept open longer than it takes to perform a query, update, etc. When you are dealing with VPN environments, it is not uncommon for there to be a timeout that will close the connection (socket) to the server. In this case, you may have to play with the VPN. But here is what I would do to figure out where your issues are:
Create a test application
Manually create an SqlConnection
Manually create a similar SqlCommand that is causing an issue pre or post connection termination
Execute the query and leave the connection open and then repeat and close the connection to see if you can reproduce the problem
Putting this in a small scale test environment will help you isolate the issue and determine which end you need to be working on.
Reply
Like
0
Chris Diesel
Chris Diesel
posted 13 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 74,
Visits: 300
Is there a method I can call to close all the sql server connections.
I'm trying to give the application a way for the user to disconnect from the server (close child windows and cisco vpn) and login again later (open vpn) without closing the main app. All is working except for when I try to login for the second time. I'm getting a SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error:0 - An existing connection was forcibly closed by the remote host). Could this be caused by the sql connection not being close prior to the vpn shutting down? Is there a way to close connections?
Thanks!
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search