[sqlite] synchorineze

2005-03-23 Thread illias
how to sync two tables in sqlite.. Production table (instore database): IDNAME PRICE --- 1 Item1 110$ 2 Item2 120$ 3 Item3 130$ 4 Item4 140$ 5 Item5 150$ 6 Item6 160$

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Dan Kennedy
What you have written below seems correct to me. If you're thinking of modifying source files to add the capability to the tcl interface, this is what I think: * You won't need to modify anything other than the "tclsqlite.c" file. Don't add a pragma. Instead add a tcl command to set the "null

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread D. Richard Hipp
On Wed, 2005-03-23 at 20:49 +0100, Stefan Finzel wrote: > Although Tcl does not know NULL at all, sqlite does. Correct. The TCL bindings map NULLs into an empty string. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Stefan Finzel
Although Tcl does not know NULL at all, sqlite does. From my current unterstanding there are five different fundamental internal datatypes. One of them is SQLITE_NULL. But SQLITE_NULL is not used at all while iterating over the results of dbcmd eval "SELECT ..." From my current unterstanding

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Kurt Welgehausen
> Yeah! I've missed the default option. But is this SQL standard? Yes. > sqlite> insert into deftest (i, s) values (NULL,''); This inserts NULL (not a string) into i and '' into s. When you retrieve that row using tcl, both are represented by empty strings. Default values replace missing

Re: [sqlite] Java Hibernate support?

2005-03-23 Thread Richard Boehme
Yes, I had it backwards :) Thanks. Richard Ionut Filip wrote: I think the question is: "Does Hibernate for Java support SQLite?" Ionut -Original Message- From: Richard Boehme [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 23, 2005 6:23 PM To: sqlite-users@sqlite.org Subject: [sqlite]

Re: [sqlite] Sqlite callback in a class. Class-member error.

2005-03-23 Thread Clay Dowling
aleks ponjavic said: > Unfortunately I'm not able to grasp the new functions, I've read through > http://www.sqlite.org/capi3.html but I can't picture how I would set up > these functions. Is there an updated sample or tutorial? Or could someone > explain the basic routine for extracting the

Re: [sqlite] Sqlite callback in a class. Class-member error.

2005-03-23 Thread Jay
> Unfortunately I'm not able to grasp the new functions, I've read > through > http://www.sqlite.org/capi3.html but I can't picture how I would set > up > these functions. Is there an updated sample or tutorial? Or could > someone > explain the basic routine for extracting the

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Dennis Cote
Stefan Finzel wrote: Within sqlite console there is a a command .nullvalue NULL All I want is to know how I can set and use this mechanismen from my Tcl interpreter too. The shell can do this because it is implemented in C, which can distinguish between the NULL and empty string return values

Re: [sqlite] Sqlite callback in a class. Class-member error.

2005-03-23 Thread aleks ponjavic
Unfortunately I'm not able to grasp the new functions, I've read through http://www.sqlite.org/capi3.html but I can't picture how I would set up these functions. Is there an updated sample or tutorial? Or could someone explain the basic routine for extracting the columnnames/amount of

Re: [sqlite] Sqlite callback in a class. Class-member error.

2005-03-23 Thread aleks ponjavic
Thank you, I will look in to it! _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

Re: [sqlite] Sqlite callback in a class. Class-member error.

2005-03-23 Thread Jay
The exec() function, the one that uses callbacks, is deprecated. You should use the prepare, bind, step routines: sqlite3_prepare(), sqlite3_bind_text(), sqlite3_step() The nice side effect is you don't have to use globals, callbacks, or the goofy work around for the 'this' pointer in your

[sqlite] Sqlite callback in a class. Class-member error.

2005-03-23 Thread aleks ponjavic
I was using global variables to transfer data from the callback to my class, but now I need this function in two classes. Thus the global variables collide causing a multiple defintion, therefore I'm trying to wrap the callback into my class. int MyFrame::callback(void *NotUsed, int argc, char

RE: [sqlite] Concurrency management

2005-03-23 Thread Steve O'Hara
There is no "queuing" of requests in SQLite - if a request (thread) is blocked on a lock then it simply goes to sleep for a period of time and then retries. It doesn't know how many other threads are doing the same thing, just that a thread somewhere has control of the database. Therefore, there

RE: [sqlite] Java Hibernate support?

2005-03-23 Thread Ionut Filip
I think the question is: "Does Hibernate for Java support SQLite?" Ionut -Original Message- From: Richard Boehme [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 23, 2005 6:23 PM To: sqlite-users@sqlite.org Subject: [sqlite] Java Hibernate support? Does SQLite support Hibernate for

[sqlite] Java Hibernate support?

2005-03-23 Thread Richard Boehme
Does SQLite support Hibernate for Java? I've been googling on it but haven't come up with anything Richard Boehme

[sqlite] Concurrency management

2005-03-23 Thread Ricaldone Simona-ASR008
Hi all, sorry but I'm new with SQLite. I have tried to find an answer to the following question but unfortunatelly I did't yet found it within the previous discussions. In details my question is the following: Scenario: - platform: Linux ARM machine; - application development language: C++; -

RE: [sqlite] COUNT(DISTINCT)

2005-03-23 Thread Thomas Briggs
Good morning Dr. Hipp, Thanks for the quick reply and the detailed explanation. I expected that that would be the answer, but it's good to hear it from the authority. Changing directions just a bit: would this be the case for things like ROLLUP and CUBE as well, or might those be more

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Stefan Finzel
Hello Jay, Yes, that is the expected behaviour. But that is not my problem. Within sqlite console there is a a command .nullvalue NULL All I want is to know how I can set and use this mechanismen from my Tcl interpreter too. Of cause it would be possible to misuse the default setting to get the

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Jay
--- Stefan Finzel <[EMAIL PROTECTED]> wrote: > Yeah! I've missed the default option. But is this SQL standard? > > And it does not seem to work for me at all. I still can't differ > empty and NULL; > create table deftest (k integer primary key, > i integer default

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Stefan Finzel
Yeah! I've missed the default option. But is this SQL standard? And it does not seem to work for me at all. I still can't differ empty and NULL; create table deftest (k integer primary key, i integer default 'NULL', s char default 'NULL'); sqlite> insert

Re: [sqlite] COUNT(DISTINCT)

2005-03-23 Thread D. Richard Hipp
On Wed, 2005-03-23 at 09:02 -0500, Thomas Briggs wrote: >Bearing in mind that I'm aware of the published workaround for > COUNT(DISTINCT x), and also that as of yet I know nothing of the > internals of SQLite: what would be involved in extending SQLite to > support the traditional

[sqlite] COUNT(DISTINCT)

2005-03-23 Thread Thomas Briggs
Bearing in mind that I'm aware of the published workaround for COUNT(DISTINCT x), and also that as of yet I know nothing of the internals of SQLite: what would be involved in extending SQLite to support the traditional "COUNT(DISTINCT x)" syntax? Is this something that hasn't been done

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Kurt Welgehausen
> Is there a way to change the NULL representation ... ? No. Tcl has no null value. Usually this is not a problem, but if you really need to distinguish between a missing value and an empty string, you can use default values. sqlite> create table deftest (k integer primary key, ...>

[sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Stefan Finzel
Hi, maybe this is also a too simple question but I miss it "once again? ;-) " I am using tclsqlite 2.8.16/3.1.x/3.2.0 to query for results containing NULL and/or empty integer/float/text/blob. Is there a way to change the NULL representation to get a specified string (NULL, NAN) for NULL values