Re: Simple SQL or database question
Posted in 1997
You can use sqlca.sqlerrd[0], but this is an ESTIMATE so beware and use at your own risk. The only way to be absolutely sure is to perform the count(*) first which is expensive. There is also a new feature in 7.23 called "First rows optimization" which you may want to look into. -Bill } } I'm running a Delphi3 application against an Informix5 database. Within the } application I have a dynamic SQL statement built by user entered data. Is } there a way to return a message to the user rather than executing the fetch } if the result set is over a predetermined number(set by me), but execute the } fetch if it is below the number? } } I have considered executing a Count statement first to determine the number } of records the fetch may bring back then having the fetch is performed, but } I'd like to make only one request to the database during this transaction. } } Any suggestions? } } Thanks kindly for the assistance. } } Apleung2@bigfoot.com } Remove the 'A' to reply. } } } } -- Bill Ennis Voice: 312-474-7516 SSA Fax: 312-474-7460 500 W. Madison email: ennis@ssax.com ennis@accesschicago.net