SQL Server, adodb.recordset Visual Basic. Memory increase on each query

I have an SQL server running but i seem to have some sort of problem.
Every time i perform a sql query the memory useage of the sqlservr.exe increases, is this normal ?

I open the Recordset doing the following
dim rs as new ADodb.recordset

and even close it
set rs = nothing

What could i be doing wrong or does the SQL server simply do this ?
Who is Participating?
You could turn on tracing on the SQL server to see what SQL processes are being hammered.

Does SQL get hammered if you do the same query in Query Analyzer?

What does the query look like?  How much data is being returned to the recordset?  Have you considered client-side ADO cursor as opposed to the default server-side cursor?
How about closing the connection.  Does that work?

mSchmidtAuthor Commented:
Nope doesnt clean up anything
Shiju SasidharanAssoc Project ManagerCommented:
hi mSchmidt
try these...

1. Keep watching when the memory usage suddenly gets raised
    i.e when
      opening the connection object
      opening the recordset
      closing the connection object
      processing the Recordset (check whether u r using MoveNext inside the loop)

     2. check the record count of the recordset (whether it is huge)
3. if 2 is the reason try to make use of Paging in Recordset (AbsolutePage property)      
4. Check whether ur Network is busy
5. try whether Sql server hangs only when ur specified query is executed

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.