Re: Simple SQL or database question
Posted in 1997
In article <63ugjp$lrs$1@news.quiknet.com>, Maddog <maddog@quiknet.com> writes > 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. > > > If your limit is 50, then fetch the 50th row. If you get a NOTFOUND error then you have less than 50 rows. -- David Williams