Re: [sqlite] Is it possible to call sqlite_exec() from within the callback made inside sqlite_exec()

2006-09-15 Thread Jay Sprenkle
that's the hard way: open db1 attach db2 insert into db2.destinationTable select * from db1.sourceTable done On 9/15/06, Kevin Stewart <[EMAIL PROTECTED]> wrote: I need to move some records from one database (and table) to another. The tables are identical. My idea was to 'select' all

[sqlite] Is it possible to call sqlite_exec() from within the callback made inside sqlite_exec()

2006-09-15 Thread Kevin Stewart
I need to move some records from one database (and table) to another. The tables are identical. My idea was to 'select' all records that match my search criteria and in the callback that is called from sqlite_exec() I can add them to the other table in the other database. This way I don't need

Re: [sqlite] Is it possible to determine if data is string or numeric inside a callback in C?

2006-01-15 Thread Eric Bohlman
Downey, Shawn wrote: Does anyone know if it is possible to determine if data is string or numeric inside a callback in C++? I am using sqlite 3.2.7. Unless you have some requirements that your code be compatible with SQLite 2.*, I'd suggest you rewrite it to use the prepare/step interface;

Re: [sqlite] Is it possible to determine if data is string or numeric inside a callback in C?

2006-01-15 Thread drh
"Downey, Shawn" <[EMAIL PROTECTED]> wrote: > Does anyone know if it is possible to determine if data is string or > numeric inside a callback in C++? I am using sqlite 3.2.7. > sqlite3_exec() converts everything to a string before the callback is invoked, of course. You could modify the

[sqlite] Is it possible to determine if data is string or numeric inside a callback in C?

2006-01-15 Thread Downey, Shawn
Does anyone know if it is possible to determine if data is string or numeric inside a callback in C++? I am using sqlite 3.2.7. Background: A table with no data type specified for a field may be populated with an unquoted number. For example: create table t1 (a); insert into t1

[sqlite] Re: Best possible concurrency

2006-01-14 Thread Igor Tandetnik
Doug Nebeker <[EMAIL PROTECTED]> wrote: I have a small number of read and writer threads. A few months ago I had some deadlock issues and one simple solution was to run all transactions as exclusive (ie BEGIN EXCLUSIVE). That works perfectly--no hint of deadlock. But now that I've been using

Re: [sqlite] Is this possible in SQLite?

2005-03-17 Thread Dennis Cote
John O'Neill wrote: Hi Dennis, Thanks for the reply. In the original "INSERT" commands, my intention was to update a field in the columns as they were being copied to the new table. Sorry, I didn't mean just "SELECT ... WHERE id=1" as the only condition...I'd like to select those items and

RE: [sqlite] Is this possible in SQLite?

2005-03-17 Thread Bob Dankert
O'Neill [mailto:[EMAIL PROTECTED] Sent: Thursday, March 17, 2005 3:48 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Is this possible in SQLite? Hi Dennis, Thanks for the reply. In the original "INSERT" commands, my intention was to update a field in the columns as they were be

RE: [sqlite] Is this possible in SQLite?

2005-03-17 Thread John O'Neill
I guess this question is can I combine an UPDATE...SET with an INSERT...SELECT command? Thanks, John -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Thursday, March 17, 2005 4:32 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is this possible in SQLite? John O'

Re: [sqlite] Is this possible in SQLite?

2005-03-17 Thread Dennis Cote
John O'Neill wrote: Hello all, I have a fairly simple DB with two tables. I'm trying to combine a SELECT and UPDATE command, if it is possible: CREATE TABLE a (id PRIMARY KEY, data INT); CREATE TABLE b (id INT, data INT); INSERT INTO a VALUES( 1, 100 ); INSERT INTO b VALUES( 1, 101 ); INSERT

Re: [sqlite] Is this possible in SQLite?

2005-03-17 Thread Kurt Welgehausen
> Is there a way to do the following: > > INSERT INTO acopy SELECT * FROM a WHERE id = 1 ( SET id = some value X ); > INSERT INTO bcopy SELECT * FROM b WHERE id = 1 ( SET id = X ); http://www.sqlite.org/lang_insert.html sql-statement ::= INSERT [OR conflict-algorithm] INTO

[sqlite] Is this possible in SQLite?

2005-03-17 Thread John O'Neill
Hello all, I have a fairly simple DB with two tables. I'm trying to combine a SELECT and UPDATE command, if it is possible: CREATE TABLE a (id PRIMARY KEY, data INT); CREATE TABLE b (id INT, data INT); INSERT INTO a VALUES( 1, 100 ); INSERT INTO b VALUES( 1, 101 ); INSERT INTO b VALUES( 1,

[sqlite] Is it possible to BIND in a CREATE TABLE

2004-11-20 Thread Randall Fox
I have a CREATE TABLE sql command with DEFAULT values. I would like to BIND the default values, but it seems it is not supported. Is this so? I am using SQLITE3.. Any help appreciated. Randall Fox

Re: [sqlite] Is it possible to 'fix' a malformed database

2004-10-11 Thread D. Richard Hipp
Paul Smith wrote: If I do pragma integrity_check on a database I get: *** in database main *** On page 8 cell 0: invalid page number 1581 SQL error: database disk image is malformed --- Is there any way to "fix" this (even if some data is lost), or does it just need throwing away and restoring

[sqlite] Is it possible to 'fix' a malformed database

2004-10-11 Thread Paul Smith
If I do pragma integrity_check on a database I get: *** in database main *** On page 8 cell 0: invalid page number 1581 On page 8 at right child: invalid page number 1582 On page 7 cell 0: invalid page number 593 On page 7 cell 1: invalid page number 594 On page 7 cell 2: invalid page number 1171

<    1   2   3   4   5