[thelist] Check for empty record set?
Bruce Douglas
bedouglas at earthlink.net
Wed Jun 18 17:57:53 CDT 2003
casey....
what's the db you're using..... in mysql, you can check the number of
records returned from the query... i assume your db API permits something
similar...
bruce
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Casey Crookston
Sent: Wednesday, June 18, 2003 3:49 PM
To: thelist at lists.evolt.org
Subject: [thelist] Check for empty record set?
If, just after executing a select statement, i'd like to check and make sure
it's not empty, how would I do that?
For example:
Set var_individual = oConn.Execute("SELECT * FROM employees WHERE
emp_id="&empid)
The user has the option to scroll through a list of employees, and as he/she
does so it uses the emp_id as the search key. Now, if by chance this
employee has quit or been fired, this SQL will return nothing. At this
point, how can I check to see if var_individual has something in it.
Thanks,
Casey
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
Evolt.org conference in London, July 25-27 2003. Register today at
http://evolt.org.uk
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list