RE: [sqlite] select help

2006-11-24 Thread RB Smissaert
Should your query not be something like this: select count(*) from blocklists where blockval like '%alexandre%' RBS -Original Message- From: Alexandre Busquets Triola [mailto:[EMAIL PROTECTED] Sent: 24 November 2006 23:48 To: sqlite-users@sqlite.org Subject: [sqlite] select help

[sqlite] Re: select help

2006-11-24 Thread Igor Tandetnik
Alexandre Busquets Triola <[EMAIL PROTECTED]> wrote: Hi have this table CREATE TABLE [blocklists] ( [blockval] VARCHAR(255) NOT NULL ) insert into blocklists blockval values('%lex%'); and I need do something like this select count(*) from blocklists where 'alexandre' like blockval How i

[sqlite] select help

2006-11-24 Thread Alexandre Busquets Triola
Hi have this table CREATE TABLE [blocklists] ( [blockval] VARCHAR(255) NOT NULL ) insert into blocklists blockval values('%lex%'); and I need do something like this select count(*) from blocklists where 'alexandre' like blockval How i can do something like with sqlite? That i need is

[sqlite] How to take off a lock on a table

2006-11-24 Thread Salvador Ramirez
Hello, I am having a problem with a table on a sqlite3 database related with a lock that left by a program that died abnormally in the middle of a select operating initiated with a call to sqlite3_prepare(). Now I wonder how to take off the lock on that table left by the program. Any

[sqlite] Re: combination of fields with || ?

2006-11-24 Thread Igor Tandetnik
Daniel Schumann <[EMAIL PROTECTED]> wrote: i try to combine two fields in a query like: SELECT id, F1||F2 AS FNew, F3 ... when both fields F1 and F2 got data everything is ok but if one of the fields is empty, the whole field FNew is empty :-( I bet the fields are not empty strings, but

[sqlite] combination of fields with || ?

2006-11-24 Thread Daniel Schumann
Hello, i try to combine two fields in a query like: SELECT id, F1||F2 AS FNew, F3 ... when both fields F1 and F2 got data everything is ok but if one of the fields is empty, the whole field FNew is empty :-( how can i solve that problem ? thx

Re: [sqlite] whether Sqlite Db supports jar files

2006-11-24 Thread epankoke
A .jar file is a Java package. If you can't open it, you must not have the Java runtime installed properly. It doesn't have anything to do with SQLite, however. -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -- Original message

[sqlite] Announcing yet another C++ wrapper.

2006-11-24 Thread Artem Gr
* Headers-only (no need to compile or install). * Single file (you can just copy it into your project). * "Cheap" thread-safety (to work with a database you /must/ lock it). * One-liners (you can write code that binds variables and runs the query / takes result from it, in a single statement). *

Re: [sqlite] Journal file not getting deleted

2006-11-24 Thread mithin
I have figured out where the problem is In one place I forgot to call sqlite3_finalize(ppStmt); Anyways, thanks a lot for your time. Thanks once again. mithin wrote: > > Thanks for replying. > > Here is what I do > > Open Database > > int err = 0; > sqlite3_stmt *ppStmt; > >

Re: [sqlite] Journal file not getting deleted

2006-11-24 Thread mithin
Thanks for replying. Here is what I do Open Database int err = 0; sqlite3_stmt *ppStmt; if(sqlite3_open(dbPath.toUtf8().data(),) != SQLITE_OK){//It opens the database correctly sqlite3_close(db); db = 0; return false; } //set the restore point //I thought this could

Re: [sqlite] Journal file not getting deleted

2006-11-24 Thread Lloyd
Are you forgetting to close the database? On Fri, 2006-11-24 at 02:03 -0800, mithin wrote: > Hi, > > In my application I am using SQLite 3 c++ API. Everything works fine till my > application is open. While doing any transaction a journal file is created. > Once I close the app, the journal file

[sqlite] Journal file not getting deleted

2006-11-24 Thread mithin
Hi, In my application I am using SQLite 3 c++ API. Everything works fine till my application is open. While doing any transaction a journal file is created. Once I close the app, the journal file is not getting deleted. Also, when I close open the application again, all the newly added data is

Re: [sqlite] Retrieving id after insert

2006-11-24 Thread Inoqulath
How about this one: CREATE VIEW vw_lastlab AS SELECT lab_id FROM lab_table WHERE rowid=last_insert_rowid(); You can fetch the last inserted ID with: SELECT * FROM vw_lastlab; HTH Brandon, Nicholas (UK) schrieb: how would I go about retriving the id that was assigned to it? I can't just