|
-
Jan 9th, 2008, 12:06 AM
#1
Thread Starter
Addicted Member
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
-
Jan 9th, 2008, 01:02 AM
#2
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|