>Thanks for replying
>It seems that it is storing all the result sets in the recordset object and you need to go through a loop to cycle using NextRecordset
>but What I want exactly is to get the last result only in the recordset object
>not multiple recordsets.
>Your reply is highly appreciated
>Ibrahim
If you could put the statements into a stored procedure, not only would it speed up your code, but you could also use the following option at the beginning of the stored procedure so that only the results of the SELECT are returned:
Set NoCount ON
If not, you can simply add this statement to your SQL string, and it should also work.
What happens is that when you make an update, it's results ("(x) rows affected by the last query", for example) become the first "Recordset", even though it is not a recordset. SET NOCOUNT ON tells the SQL server not to return such information.
Hope this helps.
Andres M. Chiriboga, MCSE, MCP+I