sql connections

  • Thread starter Gina L. Hernandez
  • Start date
G

Gina L. Hernandez

Hello:

I have a WEB application written in ADO.NET. From this application I open
connections to AS/400 database and my SQL Database, my ADO.NET application
and the databas share the same server, the question is what is more
efficient to open , uses and then close a connection for every stored
procedure I need to execute or open just a connection for everyuser and keep
this connection open until the user log out?. My system is an inventory
system, so once the user is logged in the system, many requirements are
gonna be sent to the server, as WEB requirements and sql requirements
trying to select/update/delete records in my tables.


Thanks for your help
 
H

Hans Kesting

Gina said:
Hello:

I have a WEB application written in ADO.NET. From this application I
open connections to AS/400 database and my SQL Database, my ADO.NET
application and the databas share the same server, the question is
what is more efficient to open , uses and then close a connection for
every stored procedure I need to execute or open just a connection
for everyuser and keep this connection open until the user log out?.
My system is an inventory system, so once the user is logged in the
system, many requirements are gonna be sent to the server, as WEB
requirements and sql requirements trying to select/update/delete
records in my tables.


Thanks for your help

Close the connections as soon as possible. Asp.Net manages connection pooling for you.
You just have to make sure the connection strings match exactly (that is,
the *string* should match, not the meaning: "uid=x;pwd=y" differs from "pwd=y;uid=x").

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top