thanks, but in case the recordset is empty it throws error when used rsObj .MoveFirst
I need to actually check whether or not recordset is empty.. --- On Tue, 1/10/12, Ganesh muralidharan <[email protected]> wrote: From: Ganesh muralidharan <[email protected]> Subject: Re: need help - recordset empty To: [email protected] Date: Tuesday, January 10, 2012, 5:34 AM Try a rsObj .MoveFirst On Tue, Jan 10, 2012 at 12:25 AM, Kiran Ogeti <[email protected]> wrote: I am trying the following code, but unable to get recordcount in order to check whether empty or not.. rather it always returning -1 regardless records exist or not.. PLS HELP set cmdObj= createobject("adodb.command") Set rsObj =createobject("adodb.recordset") cmdObj.ActiveConnection = strCon cmdObj.CommandText = SqlQuery Set rsObj = cmdObj.Execute' Run the SQL query MSGBOX rsObj.RecordCount thanks all -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- Regards, Ganesh Muralidharan 'God Never Forgets' -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
