all groups > sql server new users > december 2004 >
You're in the

sql server new users

group:

Database hits


Database hits foobar
12/22/2004 12:54:38 PM
sql server new users: I have an asp.net page that is querying an SqlServer Db for various data to
be displayed. Is it better to hit the database several times to pull this
data over to the page or, should my stored procedure contain several select
statements thereby only connecting to the database once?

Re: Database hits Daniel Joskovski
12/23/2004 12:11:59 AM
Hi foobar,
When you use stored procedures with multiple select statements, actually you
are using xxxDataReader class which is just another name for Serverside
Forwardonly cursor, which in other words mean that you will keep holding
resources on a server and connection open until last resultset is readed by
your code. So I don't recommend this approach.

Regards,
Daniel

[quoted text, click to view]

AddThis Social Bookmark Button