Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-16 : 08:42:38
|
| Mohd writes "I'm an ASP web developer using sql-server7 as the back end. I was running sql-server's Profiler tool to trace my queries. I noticed something weird. Everytime I have a "MoveFirst" method called, sql-server seems to rerun my query (in stored-procedure) all over again. Here are parts of my codes...set rs = server.createobject("ADODB.Recordset")sql = "Execute sp_sample " & pkid rs.CursorType = 1 'adOpenKeySetset rs = rsConn.Execute(sql) : for i=1 to 10 rs.MoveFirst while NOT rs.EOF : rs.MoveNext wendnextMy program deals with huge amount of data and cannot afford to hit the database in each loop. Why does this happen and how do I prevent it? What did I do wrong?MohdArlington, TXmsah@engineer.com" |
|
|
|
|
|