Re: [sqlite] error
Thanks On Nov 22, 2007 6:35 PM, Dennis Povshedny <[EMAIL PROTECTED]> wrote: > Hi! > > Place the limit clause at the end. > > select * from databaseentry where Sub="BarsandPubs" order by Button_Name > limit 5; > > Regards, > Dennis > > > Xeepe Phone Solution Team > http://en.xeepe.com > mailto:[EMAIL PROTECTED] > sip:[EMAIL PROTECTED] > > > -Original Message- > From: nishit sharma [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 22, 2007 3:51 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] error > > > After making command i m getting this error > > select * from databaseentry where Sub="BarsandPubs" limit 5 order by > Button_Name; SQL error: near "order": syntax error can anybody help > > regards > Nishit > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > > - > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.3/1144 - Release Date: > 21.11.2007 16:28 > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.3/1144 - Release Date: > 21.11.2007 16:28 > > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > - > > - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] syntax error
Hi All, Sending y peoples same query with some explanation. i have a database name myds.db which is having one column as index (integer default 0) which has no values in complete database. when i used to access somthing with reference to index in command than i get the error SQL error: near "index": syntax error can anybody tell me y regards Nishit
[sqlite] syntax error
Hi All, i have a database in which there is a column named index (integer value). when i m doing select index and all other stuff i m continuosly getting an error that is: SQL error: near "index": syntax error and this error doesn't come if i remove index entry from my command can anybody tell me y this is coming waiting for reply Regards Nishit
[sqlite] passing C variable in query
Hi All. can anyone tell me the syntax of passing a C variable in a query. i have taken a variable as float hd= 2000.0; how it'll be passed in a query and what'll be the syntax of that query. regards Nishit
[sqlite] passing variable in statement
Hi All, i have taken a variable as int a= 2000; and i m passing this variable in statement as sqlite3_exec(database, select < some column names > from < databasename > where ( X > '" a "')" but i m getting parse error before a. is this the right sequence to follow or there is another thing waiting for reply regards Nishit
[sqlite] passing float data types
Hi All, first i give an example of what i am doing: i have taken few data types as: float logx= x - 2000.0; loat logx1= x + 2000.0 float logy= y- 3000.0; float logy1= y + 3000.0; where x and y are define statements which are 2000.0 and 4000.0 i have an column of x_add and y_add in my database. i want to print some values on the basis of compairing of logx and logy with x_add and y_add like logx
[sqlite] function to intialize the structure member
Hi All, can anybody tell me which function in sqlite3 can help me in initializing the structure member by reading the values from database. currently i m using sqlite3_exec() function to read the values from database and calling callback function to display the values. can i initialize structure members by assigning these values read from databaseentry using sqlite3_exec(). waiting for reply regards Nishit
[sqlite] using loop in sqlite3
Hi all, this time i m trying for(g=x-1000:g<=x+1000;g+=d) where g is an integer, x is a define statement which is 2000 and d is an column value from database. now i want to print specific values from database on the basis of g by passing g in the sqlite3_exec() command. my question is it is possible to send variable in sqlite3_exec() command and get the desired results or there is different alternate to meet the requirement, waiting for reply regards Nishit
Re: [sqlite] C/C++ API
hi, in sqlite3 u r having a function named callback whose third argument is used to save the value of a column. u can store that value in an array or in char vairiable also. try this regards Nishit On 9/5/07, "Severin Müller" <[EMAIL PROTECTED]> wrote: > > Hi > > I'm new to sqlite3, and i' have some Problems with my code. I'm trying to > select data from a table and to save the result in a string. but i have no > clue how to accomplish this. > > Here is a part of my code: > > std::string get_user_info(const char* nick,int mode) > { > #ifdef _WIN32 >const char *filename = "db\\users.db"; > #else >const char *filename = "db/users.db"; > #endif >services serv; >Config conf; >sqlite3 *db; >char *zErrMsg = 0; >int rc; >char *sql = (char*) malloc(sizeof(char)*64); >rc = sqlite3_open(filename,); >if(rc) >{ >std::cout << "S_ERR_USERDATABASE" << std::endl; >globops(conf.get_s_name(),S_MSG_SRVGOINGDOWN); >sqlite3_close(db); >return NULL; >} >sprintf(sql,"SELECT * FROM '%s';",nick); >if(rc!=SQLITE_OK) >{ >fprintf(stderr,"SQL error: %s\n",zErrMsg); >sqlite3_free(zErrMsg); >} >user = ...// i'd like to store the db data in a string here... >return user; > } > > Can anybody help me here? Thanks > > > Regards > > Sevi > > > -- > GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. > Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > > - > >
Re: [sqlite] beginner
thanks for this help. i have done this... my another problem is that i have multiple columns in my database and on the basis of two columns( has integer values) i have to read the database. but i m unable to make a loop in C. can u help me. regards Nishit On 9/3/07, Pavan <[EMAIL PROTECTED]> wrote: > > You should link the library when you compile .It should be gcc > test.c-l > library name should be your sqlite shared library. Just check in /usr/lib > directory > > Thanks, > Pavan. > > > On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > hey buddy can u tell me how to compile the C source code in which i have > > used > > sqlite3_open() like calls. > > i m doing gcc test.c but it is giving me error of undefined reference. > > i think i am missing some thing in compiling. > > waiting for reply > > > > regards > > Nishit > > > > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > > > thanks for telling the link. > > > > > > regards > > > > > > > > > On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi Nishit, > > > > > > > > http://www.sqlite.org/quickstart.html > > > > > > > > This is a good link to start with. > > > > > > > > Thanks, > > > > Pavan. > > > > > > > > > > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi, > > > > > i m beginner to sqlite > > > > > can anybody send me a link which can help me > > > > > in building and maintining databse > > > > > > > > > > > > > > > > > > > > > -- > > > > ' > > > > Always finish stronger than you start > > > > * > > > > > > > > > > > > > > > > -- > ' > Always finish stronger than you start > * >
Re: [sqlite] beginner
can anybody tell me which database formats are supported by sqlite3 and the dependencies if i export my database to another system. regards Nishit On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > hey buddy can u tell me how to compile the C source code in which i have > used > sqlite3_open() like calls. > i m doing gcc test.c but it is giving me error of undefined reference. > i think i am missing some thing in compiling. > waiting for reply > > regards > Nishit > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > thanks for telling the link. > > > > regards > > > > > > On 8/30/07, Pavan <[EMAIL PROTECTED] > wrote: > > > > > > Hi Nishit, > > > > > > http://www.sqlite.org/quickstart.html > > > > > > This is a good link to start with. > > > > > > Thanks, > > > Pavan. > > > > > > > > > On 8/30/07, nishit sharma < [EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > i m beginner to sqlite > > > > can anybody send me a link which can help me > > > > in building and maintining databse > > > > > > > > > > > > > > > > -- > > > ' > > > Always finish stronger than you start > > > * > > > > > > > >
Re: [sqlite] compiling
can anybody tell me that without using argc and argv in my main() program how can i pass sqlite3 statements in my C source code. more precise is that this time i m opening the database using argc and argv in my main and in sqlite3_open() call. similarly in sqlite3_exec(). but how can i make queries in C source code to open, exec and other things to my database without using these argc and argv. waiting for the reply regards Nishit On 8/31/07, John Stanton <[EMAIL PROTECTED]> wrote: > > nishit sharma wrote: > > hi all, > > i have made a sampe which is opening a database file but i m > > unable to compile that source code and getting error that > > undefined reference to sqlite3_open(). > > i m compiling as > > gcc test.c > > > > can anybody tell that these is the command to compile > > sqlite3 application or we have any other command > > > > waiting for reply > > > > regards > > Nishit > > > You need to link with the sqlite3 library. > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > > - > >
Re: [sqlite] running code
i m able to run the code. how can i read some specific stuff from that database entry regards Nishit On 8/31/07, kirrthana M <[EMAIL PROTECTED]> wrote: > > Your test1.o with 2 arguments > first will be the name of the database and the second will be some sql > command to be executed. > > -Original Message----- > From: nishit sharma [mailto:[EMAIL PROTECTED] > Sent: Friday, August 31, 2007 5:13 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] running code > > > here i am attaching a code > can anyone tell me how to run this code. > > waiting for reply > > 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. >
[sqlite] running code
here i am attaching a code can anyone tell me how to run this code. waiting for reply #include #include static int callback(void *NotUsed, int argc, char **argv, char **azColName){ int i; for(i=0; i
Re: [sqlite] compiling
i have downloaded sqlite-3.4.2.tar.gz<http://www.sqlite.org/sqlite-3.4.2.tar.gz> from the site and i have compiled this but i didn't find any libraries regarding this. can u help me regarding libraries. regards On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > it is included. the program which i m compiling is attached and thats the > sample program available on sqlite3.org but again its giving me error. > > regards > > > On 8/31/07, kirrthana M <[EMAIL PROTECTED]> wrote: > > > > I think you have not included header file "sqlite3.h" in your code,if u > > have > > not included include and compile again. > > > > -Original Message- > > From: nishit sharma [mailto:[EMAIL PROTECTED] > > Sent: Friday, August 31, 2007 12:45 PM > > To: sqlite-users@sqlite.org > > Subject: [sqlite] compiling > > > > > > hi all, > > i have made a sampe which is opening a database file but i m > > unable to compile that source code and getting error that > > undefined reference to sqlite3_open(). > > i m compiling as > > gcc test.c > > > > can anybody tell that these is the command to compile > > sqlite3 application or we have any other command > > > > waiting for reply > > > > regards > > Nishit > > > > > > 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] > > > > - > > > > > >
Re: [sqlite] compiling
it is included. the program which i m compiling is attached and thats the sample program available on sqlite3.org but again its giving me error. regards On 8/31/07, kirrthana M <[EMAIL PROTECTED]> wrote: > > I think you have not included header file "sqlite3.h" in your code,if u > have > not included include and compile again. > > -Original Message- > From: nishit sharma [mailto:[EMAIL PROTECTED] > Sent: Friday, August 31, 2007 12:45 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] compiling > > > hi all, > i have made a sampe which is opening a database file but i m > unable to compile that source code and getting error that > undefined reference to sqlite3_open(). > i m compiling as > gcc test.c > > can anybody tell that these is the command to compile > sqlite3 application or we have any other command > > waiting for reply > > regards > Nishit > > > 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] > > - > > #include #include static int callback(void *NotUsed, int argc, char **argv, char **azColName){ int i; for(i=0; i<argc; i++){ printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL"); } printf("\n"); return 0; } int main(int argc, char **argv){ sqlite3 *db; char *zErrMsg = 0; int rc; if( argc!=3 ){ fprintf(stderr, "Usage: %s DATABASE SQL-STATEMENT\n", argv[0]); exit(1); } rc = sqlite3_open(argv[1], ); if( rc ){ fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db)); sqlite3_close(db); exit(1); } rc = sqlite3_exec(db, argv[2], callback, 0, ); if( rc!=SQLITE_OK ){ fprintf(stderr, "SQL error: %s\n", zErrMsg); sqlite3_free(zErrMsg); } sqlite3_close(db); return 0; } - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] beginner
hey buddy can u tell me how to compile the C source code in which i have used sqlite3_open() like calls. i m doing gcc test.c but it is giving me error of undefined reference. i think i am missing some thing in compiling. waiting for reply regards Nishit On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > thanks for telling the link. > > regards > > > On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote: > > > > Hi Nishit, > > > > http://www.sqlite.org/quickstart.html > > > > This is a good link to start with. > > > > Thanks, > > Pavan. > > > > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > i m beginner to sqlite > > > can anybody send me a link which can help me > > > in building and maintining databse > > > > > > > > > > > -- > > ' > > Always finish stronger than you start > > * > > > >
[sqlite] compiling
hi all, i have made a sampe which is opening a database file but i m unable to compile that source code and getting error that undefined reference to sqlite3_open(). i m compiling as gcc test.c can anybody tell that these is the command to compile sqlite3 application or we have any other command waiting for reply regards Nishit
Re: [sqlite] command
using UODATE command its working. thanks for the help regards Nishit On 8/30/07, Jim Dodgen <[EMAIL PROTECTED]> wrote: > > Also I recommend you get a very basic SQL database book. > > > Quoting John Stanton <[EMAIL PROTECTED]>: > > > nishit sharma wrote: > > > i have given some text in a database file as > > > America|england| and many more. > > > now i want to replace some text with new text how > > > this is possible. Also my database has around 15 rows now > > > which will be incremented. > > > > > > so, plz anyone tell me how to replace a text in a row and > > > how to delete a particular row. > > > > > > waiting for response > > > > > > regads > > > Nishit > > > > > How about UPDATE? > > > > > - > > To unsubscribe, send email to [EMAIL PROTECTED] > > > - > > > > > > > > > > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > > - > >
[sqlite] command
i have given some text in a database file as America|england| and many more. now i want to replace some text with new text how this is possible. Also my database has around 15 rows now which will be incremented. so, plz anyone tell me how to replace a text in a row and how to delete a particular row. waiting for response regads Nishit
Re: [sqlite] beginner
thanks for telling the link. regards On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote: > > Hi Nishit, > > http://www.sqlite.org/quickstart.html > > This is a good link to start with. > > Thanks, > Pavan. > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > Hi, > > i m beginner to sqlite > > can anybody send me a link which can help me > > in building and maintining databse > > > > > > -- > ' > Always finish stronger than you start > * >
[sqlite] beginner
Hi, i m beginner to sqlite can anybody send me a link which can help me in building and maintining databse