Re: [sqlite] API not responding correctly for vc++

2010-05-13 Thread a1rex
I hope that you know that 
sprintf(sql, "SELECT count(*) FROM table1;");

is not a going to give you  count(*)  FROM table1.

Where is your real query?



From: Prajeed chathuar <prajee...@dwisesolutions.com>
To: sqlite-users@sqlite.org
Sent: Thu, May 13, 2010 4:10:01 AM
Subject: [sqlite] API not responding correctly for vc++

Hi
I am a sotware trainee of Bangalore,India base company...i am working for
the first time in sqlite data baase..
I am trying sqlite and vc++ for last one week iam not getting correct
output.there is no linking and compiling error but not getting correct
output: here is the code


int  sqlresult = 1;
char sql[1024]="";
int rc;

sprintf(sql, "SELECT count(*) FROM table1;");

rc = sqlite3_open("sqlite3pp.db", );
if ( rc )
   {
MessageBox("Unable to open database for record count","Database
Result",MB_OK | MB_ICONERROR);
   }


In the above code my program is always returning 0X000(some hexadecimal
value)from sqlite3_open() . The data base is in the folder where the
solution file is residing..i have included the sqlite3.lib file also
which was extracted from sqlite3.def.

Can any help me for the above problem

Thanks
Prajeed.c
Software trainee
Dwise solutions,Bangalore,India


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] API not responding correctly for vc++

2010-05-13 Thread Simon Davies
On 13 May 2010 10:10, Prajeed chathuar  wrote:
> Hi
> I am a sotware trainee of Bangalore,India base company...i am working for
> the first time in sqlite data baase..
> I am trying sqlite and vc++ for last one week iam not getting correct
> output.there is no linking and compiling error but not getting correct
> output: here is the code
>
>
> int  sqlresult = 1;
> char sql[1024]="";
> int rc;
>
> sprintf(sql, "SELECT count(*) FROM table1;");
>
> rc = sqlite3_open("sqlite3pp.db", );
> if ( rc )
>   {
>        MessageBox("Unable to open database for record count","Database
> Result",MB_OK | MB_ICONERROR);
>   }
>
>
> In the above code my program is always returning 0X000(some hexadecimal
> value)from sqlite3_open() .

0X000 is hexadecimal representation of integer 0, value used to
represent symbol SQLITE_OK

> The data base is in the folder where the
> solution file is residing..i have included the sqlite3.lib file also
> which was extracted from sqlite3.def.
>
> Can any help me for the above problem
>
> Thanks
> Prajeed.c
> Software trainee
> Dwise solutions,Bangalore,India
>

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] API not responding correctly for vc++

2010-05-13 Thread Prajeed chathuar
Hi
I am a sotware trainee of Bangalore,India base company...i am working for
the first time in sqlite data baase..
I am trying sqlite and vc++ for last one week iam not getting correct
output.there is no linking and compiling error but not getting correct
output: here is the code


int  sqlresult = 1;
char sql[1024]="";
int rc;

sprintf(sql, "SELECT count(*) FROM table1;");

rc = sqlite3_open("sqlite3pp.db", );
if ( rc )
   {
MessageBox("Unable to open database for record count","Database
Result",MB_OK | MB_ICONERROR);  
   }


In the above code my program is always returning 0X000(some hexadecimal
value)from sqlite3_open() . The data base is in the folder where the
solution file is residing..i have included the sqlite3.lib file also
which was extracted from sqlite3.def.

Can any help me for the above problem

Thanks
Prajeed.c
Software trainee
Dwise solutions,Bangalore,India


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users