[sqlite] Help Please Sqlite3Explorer

2008-11-03 Thread Rajesh Nair
Hi all I have asked about Sqlite3 reporting tool before. I got some reply and I downloaded the Sqlite3Explorer and the dll mkfrXengine.dll for the reporting service. But it can be used with only SqLite3Explorer and is working perfectly along with it. Can any one help me to call the function "*

[sqlite] offical full list of valid data types?

2008-11-03 Thread 灵感之源
Hi, I found an offical mention here: http://www.sqlite.org/datatype3.html but seems not a "full list", because it only mention some "Affinity". I want a full list of ALL VALID data types that sqlite really support, here is my result, does anyone could make it really full list? REAL

Re: [sqlite] create table default expr

2008-11-03 Thread John
Igor Tandetnik wrote: > "John" <[EMAIL PROTECTED]> wrote > in message news:[EMAIL PROTECTED] >> I want to (if possible) create a table with a default timestamp in a >> format other than "-MM-DD ..." per example below. I have tried a >> few variants but always get same error. >> >> Can this be

Re: [sqlite] Sqlite concurrency problem

2008-11-03 Thread D. Richard Hipp
On Nov 3, 2008, at 8:04 AM, Paul Clarke wrote: > Is it really correct that in order to perform an INSERT, Sqlite > demands > that no other connections be active? > > It uses the same database instance but (obviously) separate statements > for each operation > Please distinguish between a

Re: [sqlite] simple? query problem

2008-11-03 Thread BareFeet
Hi Ralf, > I've got two tables A, B > > Now I want the entries from B with no corresponding entry in A > > I did the following: > > Select id.field from B > > Where (select count(id.field) from A) = 0 > > Unfortunately it didn't work, the query should have returned 1 entry. > > Where is my

Re: [sqlite] Subselect question

2008-11-03 Thread Ingo Koch
Igor Tandetnik wrote: > How about this: > > select A.*, B.* > from TBOOKING A, TBOOKING B > where A.EVENTTYPE = 3 and B.ID = ( > select min(C.ID) from TBOOKING C > where C.EVENTTYPE = 4 and C.ID > A.ID > ); > > Igor Tandetnik Igor, you are my hero ;-) I've tried a subselect in the

Re: [sqlite] simple? query problem

2008-11-03 Thread Griggs, Donald
Hi, Ralf, Regarding: "I want the entries from B with no corresponding entry in A " I believe one way would be: SELECT * FROM B WHERE id NOT IN (SELECT id FROM A); ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Sqlite concurrency problem

2008-11-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Clarke wrote: > Is it really correct that in order to perform an INSERT, Sqlite demands > that no other connections be active? http://www.sqlite.org/lockingv3.html http://www.sqlite.org/sharedcache.html http://www.sqlite.org/atomiccommit.html

[sqlite] simple? query problem

2008-11-03 Thread Ralf Jantschek
Hello, I've got two tables A, B Now I want the entries from B with no corresponding entry in A I did the following: Select id.field from B Where (select count(id.field) from A) = 0 Unfortunately it didn't work, the query should have returned 1 entry. Where is my mistake?

[sqlite] Sqlite concurrency problem

2008-11-03 Thread Paul Clarke
Is it really correct that in order to perform an INSERT, Sqlite demands that no other connections be active? I have an application that loops through a results set and performs INSERTS. It uses the same database instance but (obviously) separate statements for each operation When the

Re: [sqlite] Subselect question

2008-11-03 Thread Igor Tandetnik
Griggs, Donald <[EMAIL PROTECTED]> wrote: > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Ingo Koch Sent: Monday, November 03, 2008 2:15 PM >> SELECT t.*, u.* >> FROM TBOOKING AS t LEFT JOIN TBOOKING as u ON t.ID+1=u.ID WHERE >>

Re: [sqlite] Subselect question

2008-11-03 Thread Ingo Koch
Griggs, Donald wrote: > When you wrote: "... but I didn't want to keep track of an additional > ID in the application but instead let the database do the work." > > I don't think I understand what logic the database is supposed to use to > determine this. If you were talking to a database

Re: [sqlite] Subselect question

2008-11-03 Thread Griggs, Donald
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ingo Koch Sent: Monday, November 03, 2008 2:15 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Subselect question Csaba wrote: > Firstly, perhaps you should be linking the start and

Re: [sqlite] Subselect question

2008-11-03 Thread Ingo Koch
Csaba wrote: > Firstly, perhaps you should be linking the start and stop event across > a common id rather than relying on a start and stop appearing as > consecutive entries. Without knowing more about where your database > comes from it's hard to say. > > If you insist on keeping the current

Re: [sqlite] Query Issues: Duplicates In UNION Query

2008-11-03 Thread TW
> Frankly, I don't understand why you would ever need such a beast, and I > probably don't want to know (I suspect it will give me nightmares). In > any case, assuming you really have a reason for this monster, try > something like this: Yeah, I need it, and the query that I

Re: [sqlite] Query Issues: Duplicates In UNION Query

2008-11-03 Thread Igor Tandetnik
TW <[EMAIL PROTECTED]> wrote: > It would look like this: > > FName LName Side Height > -- > Igor Tande A 1 > Telly Will B 1 > John Smith A 1 > Bob Hope B 1 > Sandy Rivera A 2 > Bobby Sangria B 2 > Jane Tane A 2 > Tom Jones B 2 > > SELECT Fname, Lname, Side, Height FROM

Re: [sqlite] Query Issues: Duplicates In UNION Query

2008-11-03 Thread TW
> Order is never guaranteed in a SQL statement's resultset, unless this > statement specifies an ORDER BY clause. If some statement without such a > clause happens to give you an order you want, it does so by accident. If > you want a particular order, say so in the statement. Yeah,

Re: [sqlite] Valgrind complains about sqlite

2008-11-03 Thread Martin Engelschalk
Hello Daniel, i know this specific output "Syscall param write(buf) points to uninitialised byte(s)" from my programs. It appears outside sqlite, too. It is not a problem. Martin Daniel Hellsson wrote: > I have sqlite3 3.6.4 and the program I've written gets in trouble with > valgrind. > >

Re: [sqlite] Valgrind complains about sqlite

2008-11-03 Thread Dan
On Nov 3, 2008, at 11:01 PM, Daniel Hellsson wrote: > I have sqlite3 3.6.4 and the program I've written gets in trouble with > valgrind. > > > > Valgrind reports: > > > > ==29506== 128 errors in context 7 of 7: > > ==29506== Syscall param write(buf) points to uninitialised byte(s) > > ==29506==

[sqlite] Valgrind complains about sqlite

2008-11-03 Thread Daniel Hellsson
I have sqlite3 3.6.4 and the program I've written gets in trouble with valgrind. Valgrind reports: ==29506== 128 errors in context 7 of 7: ==29506== Syscall param write(buf) points to uninitialised byte(s) ==29506==at 0x41354FB: (within /targets/DIABLO_X86/lib/libc-2.5.so) ==29506==

Re: [sqlite] "SQL logic error or missing database" with multithreaded program

2008-11-03 Thread D. Richard Hipp
On Nov 3, 2008, at 9:54 AM, Ken wrote: > No I would not wrap the querries in a transaction. > > I think the problem you are encountering is due to thread > interaction upon the sqlite structures. Since it was compiled with > THREADsafety disabled. > > If you have two threads that share the

Re: [sqlite] sqlite3_prepare memory leak

2008-11-03 Thread Sherief N. Farouk
> As you can see I use sqlite3_prepare/sqlite3_finalize pairs. My memory > leak checker ( Deleaker : www.deleaker.com ) reports memory leak at > sqlite3_prepare : > > msvcrt.dll!malloc > sqlite3.dll!sqlite3_malloc + 120 bytes > sqlite3.dll!sqlite3_realloc + 27 bytes >

Re: [sqlite] "SQL logic error or missing database" with multithreaded program

2008-11-03 Thread Ken
No I would not wrap the querries in a transaction. I think the problem you are encountering is due to thread interaction upon the sqlite structures. Since it was compiled with THREADsafety disabled. If you have two threads that share the same connection. You need to compile with THREADSAFE

Re: [sqlite] Convert integer IP address to string IP address in Sqlite

2008-11-03 Thread dbikash
Thanks Igor. It is working now. I seem to have made a mistake earlier with the brackets and pipes and quotes and ampersands ... Sorry the trouble. dbikash. Igor Tandetnik wrote: > > "dbikash" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] >> This is not working for me. I just

Re: [sqlite] "SQL logic error or missing database" with multithreaded program

2008-11-03 Thread dbikash
Many Thanks Ken for your guidelines. Following your suggestions I found that indeed there was a silly mistake in the querying thread (I was using a 2-D array of queries, and I missed a comma :-( ). After correcting this mistake, the two threads ran fine when run one at a time. When run

Re: [sqlite] Convert integer IP address to string IP address in Sqlite

2008-11-03 Thread Igor Tandetnik
"dbikash" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is not working for me. I just get the first octet. > > (The concat function is also not supported?) || (two pipe characters) is a concatenation operator in SQL. That is, 'a' || 'b' = 'ab'. concat() function is not

Re: [sqlite] Query Issues: Duplicates In UNION Query

2008-11-03 Thread Igor Tandetnik
"TW" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have been doing a Union query and would like to obtain distinct > results. > Via the manual, the correct way to accomplish this is to do a UNION > statement (versus > doing a UNION ALL). > > Problem: I want the order of the

Re: [sqlite] create table default expr

2008-11-03 Thread Igor Tandetnik
"John" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I want to (if possible) create a table with a default timestamp in a > format other than "-MM-DD ..." per example below. I have tried a > few variants but always get same error. > > Can this be done and if so, how? > > create

[sqlite] Pragma integrity_check and attached ddatabases

2008-11-03 Thread BR-Software
Hello, Will "pragma integrity_check" also check attached databases? Best regards Baard Riiber ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem with dates

2008-11-03 Thread Igor Tandetnik
"Timothy A. Sawyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My SQLite database was imported from an Access database where the > dates (in > Access) were stored as mm/dd/. My application is written in Java > where I > am using the DateFormat method to convert the date to

[sqlite] Problem with dates

2008-11-03 Thread Timothy A. Sawyer
Good morning, I am having a problem extracting correct rows from the database based on date. Perhaps someone can help. My SQLite database was imported from an Access database where the dates (in Access) were stored as mm/dd/. My application is written in Java where I am using the

[sqlite] sqlite3_prepare memory leak

2008-11-03 Thread Bartosz Wiklak
Hi, In my C++ application I'm writing/reading some blob data to the database. This is sample of my code (in 99% taken from example i found in the internet ): /** * This function reads one blob value asqued in zSql query into memory pointed by pzBlob * and returns size of allocated memory in

Re: [sqlite] create table default expr

2008-11-03 Thread John
Simon Davies wrote: > 2008/11/3 John <[EMAIL PROTECTED]>: >> Hi >> >> I want to (if possible) create a table with a default timestamp in a >> format other than "-MM-DD ..." per example below. I have tried a few >> variants but always get same error. >> >> Can this be done and if so, how? >>

Re: [sqlite] Making the binary small

2008-11-03 Thread Pados Károly
Using strip solved the problem, object file size is down to 114KB. Thank you very much. Károly > The sizes that I mentioned (315KB vs 205KB) are for the final .dll and > .so size. You might try linking your object files into a lib to see > how that affects size. You could also try running

Re: [sqlite] Subselect question

2008-11-03 Thread Dan
>> Here is some test data: >> - >> CREATE TABLE "TBOOKING" ( >> "ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, >> "EVENTTIMESTAMP" TIMESTAMP NOT NULL, >> "EVENTTYPE" INTEGER NOT NULL, >> "EMPLOYEE" INTEGER); >> >> INSERT INTO "TBOOKING" VALUES(42,'2008-09-22

Re: [sqlite] Convert integer IP address to string IP address in Sqlite

2008-11-03 Thread dbikash
This is not working for me. I just get the first octet. (The concat function is also not supported?) Thanks dbikash Igor Tandetnik wrote: > > Jonathon <[EMAIL PROTECTED]> wrote: >> I was just curious if there is a way to convert an integer >> representation of an IP address that I store in

Re: [sqlite] create table default expr

2008-11-03 Thread Simon Davies
2008/11/3 John <[EMAIL PROTECTED]>: > Hi > > I want to (if possible) create a table with a default timestamp in a > format other than "-MM-DD ..." per example below. I have tried a few > variants but always get same error. > > Can this be done and if so, how? > > create table ( >

[sqlite] create table default expr

2008-11-03 Thread John
Hi I want to (if possible) create a table with a default timestamp in a format other than "-MM-DD ..." per example below. I have tried a few variants but always get same error. Can this be done and if so, how? create table ( custnum integer primary key not null, note text,