Re: [sqlite] SQLite template files

2010-04-07 Thread Jean-Denis Muys
On 4/6/10 18:50 , BareFeet list@tandb.com.au wrote: I understand that in many cases, the SQLite database developed are intrinsically tied to and designed for the application framework in which they reside. However, even those SQLite database files can be opened and manipulated by a SQLite

Re: [sqlite] SQLite on Windows 2003

2010-04-07 Thread Mark Spiegel
Burnett, Joe wrote: Hi Teg, UTF-8, no special characters in the file name WorkData.s3db. Thanks, Joe Joe Burnett | Principal Software Engineer | FIDELITY INSTITUTIONAL TECHNOLOGY 2 Contra Way Merrimack, NH 03054 603.791.5113 cell: 603.289.0481 If you can debug your application,

Re: [sqlite] SQLite on Windows 2003

2010-04-07 Thread Roger Binns
On 04/07/2010 07:34 AM, Mark Spiegel wrote: If you can debug your application, more specifically SQLite, set a breakpoint in winOpen() and find out what return code CreateFile() is returning for the various calls. That along with the arguments passed should help you work it out.

Re: [sqlite] Concurrency for in-memory scenarios

2010-04-07 Thread Alexey Pechnikov
Hello! On Tuesday 06 April 2010 17:43:47 Kent Boogaart wrote: What I'm wondering is whether SQLite flat out doesn't support concurrent access to an in-memory database, or perhaps whether I'm just doing something wrong. Can anyone confirm whether concurrent access to an in-memory database

Re: [sqlite] SQLite on Windows 2003

2010-04-07 Thread Dave Dyer
Alternatively use Process Monitor from sysinternals.com which will show arguments and return codes without any need to run a debugger. Even better, use FILEMON (from sysinternals.com) for clues. It's wonderful. ___ sqlite-users mailing list

Re: [sqlite] SQLite on Windows 2003

2010-04-07 Thread Roger Binns
Alternatively use Process Monitor from sysinternals.com which will show arguments and return codes without any need to run a debugger. Even better, use FILEMON (from sysinternals.com) for clues. It's wonderful. Err, no. You are 4 years out of date. The functionality of filemon, regmon etc

[sqlite] copy one row to another

2010-04-07 Thread P Kishor
is there a canonical way of copying all the columns (except for the PKs, of course) from one row to another in the same table? I want to make all columns of row id = 649 in my table to become a duplicate of the values in row id = 651... of course, I want the id 649 to remain 649. UPDATE t649 SET

Re: [sqlite] copy one row to another

2010-04-07 Thread Pavel Ivanov
Probably the only way to do that is REPLACE INTO t (id, foo, bar, ...) SELECT 649, foo, bar, ... WHERE id = 651 Pavel On Wed, Apr 7, 2010 at 4:33 PM, P Kishor punk.k...@gmail.com wrote: is there a canonical way of copying all the columns (except for the PKs, of course) from one row to

Re: [sqlite] copy one row to another

2010-04-07 Thread P Kishor
On Wed, Apr 7, 2010 at 3:46 PM, Pavel Ivanov paiva...@gmail.com wrote: Probably the only way to do that is REPLACE INTO t (id, foo, bar, ...) SELECT 649, foo, bar, ... WHERE id = 651 I get a Error: constraint failed. I have no constraint other than INTEGER PRIMARY KEY on id. Pavel On

Re: [sqlite] copy one row to another

2010-04-07 Thread Simon Slavin
On 7 Apr 2010, at 10:06pm, P Kishor wrote: On Wed, Apr 7, 2010 at 3:46 PM, Pavel Ivanov paiva...@gmail.com wrote: Probably the only way to do that is REPLACE INTO t (id, foo, bar, ...) SELECT 649, foo, bar, ... WHERE id = 651 I get a Error: constraint failed. I have no constraint

Re: [sqlite] copy one row to another

2010-04-07 Thread Pavel Ivanov
I get a Error: constraint failed. I have no constraint other than INTEGER PRIMARY KEY on id. You should have something other than integer primary key, otherwise it works: sqlite create table t (id integer primary key, foo, bar); sqlite insert into t values (649, 'foo 1', 'bar 1'); sqlite

Re: [sqlite] copy one row to another

2010-04-07 Thread P Kishor
On Wed, Apr 7, 2010 at 4:20 PM, Simon Slavin slav...@bigfraud.org wrote: On 7 Apr 2010, at 10:06pm, P Kishor wrote: On Wed, Apr 7, 2010 at 3:46 PM, Pavel Ivanov paiva...@gmail.com wrote: Probably the only way to do that is REPLACE INTO t (id, foo, bar, ...) SELECT 649, foo, bar, ... WHERE

Re: [sqlite] copy one row to another

2010-04-07 Thread Alexey Pechnikov
Hello! On Thursday 08 April 2010 01:06:25 P Kishor wrote: Probably the only way to do that is REPLACE INTO t (id, foo, bar, ...) SELECT 649, foo, bar, ... WHERE id = 651 I get a Error: constraint failed. I have no constraint other than INTEGER PRIMARY KEY on id. This work right:

Re: [sqlite] copy one row to another

2010-04-07 Thread P Kishor
On Wed, Apr 7, 2010 at 4:24 PM, Pavel Ivanov paiva...@gmail.com wrote: I get a Error: constraint failed. I have no constraint other than INTEGER PRIMARY KEY on id. You should have something other than integer primary key, otherwise it works: sqlite create table t (id integer primary key,

Re: [sqlite] copy one row to another

2010-04-07 Thread Ted Rolle
I tried to do that, and hit walls all over the place. My solution was to import the table into OpenOffice Calc and move the columns around there. Not too elegant, but it worked. Ted On Wed, Apr 7, 2010 at 4:33 PM, P Kishor punk.k...@gmail.com wrote: is there a canonical way of copying all the

Re: [sqlite] copy one row to another

2010-04-07 Thread Nicolas Williams
sqlite CREATE TABLE foo(id INTEGER PRIMARY KEY, a, b, c); sqlite insert into foo values(1, 'a', 'b', 'c'); sqlite select * from foo; 1|a|b|c sqlite CREATE TEMP TABLE tempfoo AS SELECT * FROM foo WHERE id = 1; sqlite UPDATE tempfoo SET a = 'z'; sqlite INSERT OR REPLACE INTO foo SELECT * FROM

Re: [sqlite] copy one row to another

2010-04-07 Thread P Kishor
On Wed, Apr 7, 2010 at 6:57 PM, Nicolas Williams nicolas.willi...@sun.com wrote: sqlite CREATE TABLE foo(id INTEGER PRIMARY KEY, a, b, c); sqlite insert into foo values(1, 'a', 'b', 'c'); sqlite select * from foo; 1|a|b|c sqlite CREATE TEMP TABLE tempfoo AS SELECT * FROM foo WHERE id = 1;

Re: [sqlite] copy one row to another

2010-04-07 Thread Dan Kennedy
On Apr 8, 2010, at 4:33 AM, P Kishor wrote: On Wed, Apr 7, 2010 at 4:24 PM, Pavel Ivanov paiva...@gmail.com wrote: I get a Error: constraint failed. I have no constraint other than INTEGER PRIMARY KEY on id. You should have something other than integer primary key, otherwise it works: