[freetds] dbnextrow() question

craigs s.craig at andronics.com
Tue Mar 8 05:58:23 EST 2005


found an easier way of doin it.

while (dbnextrow(dbconn) != NO_MORE_ROWS)
{
      if ( find what i want )
      {
            do something here
            now exit doing the following

	    return NO_MORE_ROWS; // this will let you exit
      }
}


Thompson, Bill D (London) wrote:

>Shaun
>
>see dbcanquery() or dbcancel() . dbcanquery looks like exactly what you
>want.
>
>-----Original Message-----
>From: freetds-bounces at lists.ibiblio.org
>[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of craigs
>Sent: 04 March 2005 12:19
>To: FreeTDS Development Group
>Subject: [freetds] dbnextrow() question
>
>
>Could someone tell me how to exit this loop?  I dont want to run through
>
>thousands of unnecessary records when i find the one i want.
>
>while (dbnextrow(dbconn) != NO_MORE_ROWS)
>{
>      if ( find what i want )
>      {
>            do something here
>            now i want to exit out off this loop
>      }
>}
>
>Shaun
>_______________________________________________
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds 
>--------------------------------------------------------
> 
>If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/ 
>--------------------------------------------------------
> 
>_______________________________________________
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds
>  
>




More information about the FreeTDS mailing list