hi all
I am having problems running a recordset. Throught my program.. what I do to query data from tables I use recordsets. This is what I usually do
and works fine all the time.. until one point when it starts lagging... like usually it itakes a couple of seconds to run the code.. but now it takes like 2-3 mins.. I have checked putting stops between the code to check where the problem is.. and starts lagging in one of the lines where I use:
is there a limit of recordset I can make in a period of time? if so whats the limit? and how could I fix he problem to make it run smoothly...
Hope someone can help me.. I would really appreciatte it.. Thanks in Advance
Regards.
I am having problems running a recordset. Throught my program.. what I do to query data from tables I use recordsets. This is what I usually do
Code:
Dim RS As DAO.Recordset
Dim DB As Database
Dim SQLStr As String
Set DB = CurrentDb()
SQLStr = "Select * From TableName"
Set RS = DB.OpenRecordset(SQLStr)
If RS.EOF And RS.BOF Then
RS.MoveLast
TotalRows = RS.RecordCount
RS.MoveFirst
TempArray = RS.GetRows(TotalRows)
End If
and works fine all the time.. until one point when it starts lagging... like usually it itakes a couple of seconds to run the code.. but now it takes like 2-3 mins.. I have checked putting stops between the code to check where the problem is.. and starts lagging in one of the lines where I use:
Code:
Set RS = DB.OpenRecordset(SQLStr)
is there a limit of recordset I can make in a period of time? if so whats the limit? and how could I fix he problem to make it run smoothly...
Hope someone can help me.. I would really appreciatte it.. Thanks in Advance
Regards.