return value

Results 1 to 2 of 2

Thread: return value

  1. #1
    Join Date
    Dec 1969

    Default return value

    How do I check that whether the following statement has found the record or not? <BR><BR>sql="Select * from manager where Name=&#039"& request.form("name") &"&#039 and Password=&#039"& request.form("password") & "&#039 " <BR>set objRS=objConn.Execute(sql)<BR><BR>Thanks

  2. #2
    Rajendra Guest

    Default RE: return value

    You can simply check it this way:<BR> if obRS.eof then<BR> No record found.<BR> else<BR> there are some records. Do whatever you wish to do with it<BR> end if<BR><BR>you have opened the recordset using conn.execute method. This opens the recordset with the forward only cursor and this does not support the recordcount property of the recordset. if you open the recordset in the following manner, you can also check the number of records:<BR> sql,conn,3 (here 3 for adOpenStatic cursor)<BR>NumRecords = obRS.recordcount

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts