It works fine..Thanks..

Kirrthana

-----Original Message-----
From: Bharath Booshan L [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 31, 2008 12:07 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Getting the no of rows using count(*)


Hello Kirrthana,

> should i use prepare and step in this case and where the result of the
query
> will be stored on executing my c code.

  retValue = sqlite3_prepare( dataBaseConnection ,sqlQuery,-1,&ppStmt ,0);

if( retValue != SQLITE_BUSY && (retValue = sqlite3_step( ppStmt ) ==
SQLITE_ROW )
{
   numOfRows  =sqlite3_column_int64(ppStmt ,0);

}

sqlite3_finalize( ppStmt );


This should do it

--
Bharath

On 1/31/08 11:00 AM, "kirrthana M" <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> Im using the query Select count(*) from table to get the no of rows in the
> table in my c code.
> In the command line it will print the no of rows ,but in my c code how can
i
> get the result,
> should i use prepare and step in this case and where the result of the
query
> will be stored on executing my c code.
>
> Regards
> Kirrthana
>
> The information contained in this electronic message and any attachments
to
> this message are intended for the exclusive use of the addressee(s) and
may
> contain proprietary, confidential or privileged information. If you are
not
> the intended recipient, you should not disseminate, distribute or copy
this
> e-mail. Please notify the sender immediately and destroy all copies of
this
> message and any attachments contained in it.
>
> Contact your Administrator for further information.
>



-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies. Emails
to and from our network may be logged and monitored. This email and its
attachments are scanned for virus by our scanners and are believed to be
safe. However, no warranty is given that this email is free of malicious
content or virus.



----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments contained in it.

Contact your Administrator for further information.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to