Results 1 to 7 of 7

Thread: Another select statement

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    138

    Re: Another select statement

    L.

    Thanks for the replay, but I have a question

    how count(*) will help check if a result came back.

    I am looking for a particular record last_name (smith) within the table if there is a smith the select statement will bring the record but if not the select statement will nothing is here where I need to check if something came back or not

    it seems like count(*) will tell me if there are records on a table. am I missing something

    Thanks for battling

  2. #2
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: Another select statement

    so do it like this:

    strSQL="SELECT * FROM TableA
    WHERE LastName='Smith'"

    run that throught the recordset with the cursor set to static.

    once it is open, do a recordset.recordcount and that will give you the count.

    Pretty much similar to what I described in the previous post.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

Posting Permissions

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



Click Here to Expand Forum to Full Width