![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Knowledge Base Most common error and how to trouble shoot them off |
![]() |
|
strange problem - recordset query loses data after response.write
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 1,672
Join Date: Mar 2007
Rep Power: 3
IM:
|
' Run the query. Set adoRecordset = adoCommand.Execute ' Enumerate the resulting recordset. response.write adorecordset.recordcount <<< this returns the correct value of 9, however if this line is enabled the next line doesn't work Do Until adoRecordset.EOF <<< if the above line is commented out, this will run, if its not this fails ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record which means the data doesn't exist after i do a response.write? how come how do i keep it set untill i clear it? if i run the query again for a second time after the response.write it will work, but the query is complex and i dont want to run it twice in the same page just to find the same information out, how can i fix this? |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 1,672
Join Date: Mar 2007
Rep Power: 3
IM:
|
you migh try this: response.write adorecordset.recordcount adoRecordset.Movefirst Do Until adoRecordset.EOF but you might run into another error, ie like "provider does not support move..." tip: instead of Set adoRecordset = adoCommand.Execute try this: Set adoRecordset = Server.CreateObject("ADODB.Recordset") adoRecordset.open adoCommand question: what database? why did you post ing Windows 2003 Active Directory? |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|