[sqlite] is there a pragma to disable triggers?

2008-08-11 Thread Kodok Márton
Hello, I am working on a syncing project and I do have a lot of triggers to read/write foreign keys. And while I do the sync of one table the triggers are causing a strange effect (as the other table is not yet synced). Is there a pragma to disable triggers on the sqlite database? Regards,

[sqlite] quickly locking/unlocking database with password

2008-08-11 Thread Kodok Márton
Hello, I use C# to connect SQLite. connStr = @"Data Source=" + databaseFilePath + ";New=True;Version=3;"; conn = new SQLiteConnection(connStr); I know I can add a Password=something; string to the connection string in order to get a locked/encrypted database. I am wondering if there is a quick

[sqlite] "unable to open database file" on DROP

2008-08-11 Thread Robert Latest
Hello people, why is it that I can look at the ".schema" of a db with the sqlite3 command line tool, but can't drop a table or view? After all, if the db file weren't open, I couldn't even see the schema. My problem is that I've written an app that uses views to access data. After usage, I don't

Re: [sqlite] "unable to open database file" on DROP

2008-08-11 Thread P Kishor
On 8/11/08, Robert Latest <[EMAIL PROTECTED]> wrote: > Hello people, > > why is it that I can look at the ".schema" of a db with the sqlite3 > command line tool, but can't drop a table or view? After all, if the > db file weren't open, I couldn't even see the schema. I have no idea what you

Re: [sqlite] quickly locking/unlocking database with password

2008-08-11 Thread Mihai Limbasan
Kodok Márton wrote: Hello, I use C# to connect SQLite. connStr = @"Data Source=" + databaseFilePath + ";New=True;Version=3;"; conn = new SQLiteConnection(connStr); I know I can add a Password=something; string to the connection string in order to get a locked/encrypted database. I am

Re: [sqlite] "unable to open database file" on DROP

2008-08-11 Thread Mihai Limbasan
Robert Latest wrote: Hello people, why is it that I can look at the ".schema" of a db with the sqlite3 command line tool, but can't drop a table or view? After all, if the db file weren't open, I couldn't even see the schema. My problem is that I've written an app that uses views to access

[sqlite] ODBC driver for C error "only one SQL statement allowed"

2008-08-11 Thread Abshagen, Martin RD-AS2
Hi, sqlite-users, am evaluating Sqlite ODBC driver for C (current sqliteodbc.exe by Ch. Werner, http://www.ch-werner.de/sqliteodbc/). After defining successfully two tables "mytable" and "mysequence", I tried to define a trigger by means of "CREATE TRIGGER trg BEFORE INSERT ON mytable FOR EACH

Re: [sqlite] ODBC driver for C error "only one SQL statement allowed"

2008-08-11 Thread Mihai Limbasan
Abshagen, Martin RD-AS2 wrote: Hi, sqlite-users, am evaluating Sqlite ODBC driver for C (current sqliteodbc.exe by Ch. Werner, http://www.ch-werner.de/sqliteodbc/). After defining successfully two tables "mytable" and "mysequence", I tried to define a trigger by means of "CREATE TRIGGER trg

Re: [sqlite] "unable to open database file" on DROP

2008-08-11 Thread P Kishor
On 8/11/08, Mihai Limbasan <[EMAIL PROTECTED]> wrote: > Robert Latest wrote: > > > Hello people, > > > > why is it that I can look at the ".schema" of a db with the sqlite3 > > command line tool, but can't drop a table or view? After all, if the > > db file weren't open, I couldn't even see the

Re: [sqlite] "unable to open database file" on DROP

2008-08-11 Thread Robert Latest
On Mon, Aug 11, 2008 at 1:42 PM, P Kishor <[EMAIL PROTECTED]> wrote: > ahhh... I did misread the question. Yes, the above explanation seems > logical. Your app is probably tying up the db, so you can't drop the > table from the command line. No it ain't. That's of course the first thing I

Re: [sqlite] "unable to open database file" on DROP

2008-08-11 Thread Igor Tandetnik
"Robert Latest" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > $ sqlite3 /cygdrive/d/cl_hist_dat/clhist.sqlite > SQLite version 3.5.1 > Enter ".help" for instructions > sqlite> create view y as select * from tools; > sqlite> create temporary view z as select * from modules; > SQL

[sqlite] multiple inserts

2008-08-11 Thread Kodok Márton
Hi, Does SQLite accepts multiple insert? insert into table (col1,col2) values (val1,val2), (val3,val4), (val5,val6) If not, how can I speed up large inserts? eg: 1000 rows Regards, Marton ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] multiple inserts

2008-08-11 Thread P Kishor
On 8/11/08, Kodok Márton <[EMAIL PROTECTED]> wrote: > Hi, > > Does SQLite accepts multiple insert? > insert into table (col1,col2) values (val1,val2), (val3,val4), (val5,val6) > > If not, how can I speed up large inserts? > eg: 1000 rows one word... transactions > > Regards, > Marton >

[sqlite] SQL error: disk I/O error, for attached DBs on power PC

2008-08-11 Thread France Hsu
Hi! All, We recently got an error "Disk I/O error" while using the select command on attached DBs. These DBs have same table format We only execute select, insert, and attach commands The environment is as follows: SQLite: V3.5.6 OS: Linux 2.6.24.2 Platform Power PC (MPC8543) Memory: 256M DB

Re: [sqlite] multiple inserts

2008-08-11 Thread cmartin
On Mon, 11 Aug 2008, P Kishor wrote: On 8/11/08, Kodok M�rton <[EMAIL PROTECTED]> wrote: Hi, Does SQLite accepts multiple insert? insert into table (col1,col2) values (val1,val2), (val3,val4), (val5,val6) If not, how can I speed up large inserts? eg: 1000 rows one word... transactions

Re: [sqlite] multiple inserts

2008-08-11 Thread Kodok Márton
begin; insert into table (col1,col2) values (val1,val2); insert into table (col1,col2) values (val3,val4); insert into table (col1,col2) values (val5,val6); end; you might use FOR or WHILE to construct the query another example sqlite_exec($db,"BEGIN;"); for($x = 1; $x<=50; $x++) {

Re: [sqlite] multiple inserts

2008-08-11 Thread P Kishor
On 8/11/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Mon, 11 Aug 2008, P Kishor wrote: > > > > On 8/11/08, Kodok Márton <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > Does SQLite accepts multiple insert? > > > insert into table (col1,col2) values (val1,val2), (val3,val4), >

Re: [sqlite] multiple inserts

2008-08-11 Thread Szomraky, Stefan
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kodok Márton > Sent: Monday, August 11, 2008 2:21 PM > To: General Discussion of SQLite Database > Subject: [sqlite] multiple inserts > > Hi, > > Does SQLite accepts multiple insert? > insert into

[sqlite] Using TOTAL and AS in the SQL of a Flex app

2008-08-11 Thread Ross Edwards
I really don't know where to post this, as it involves both SQLite and Flex 3, but, I'll try here first. Here's what I have in FlexBuilder: sqlText = "SELECT Up18RODetail.ProductID, TOTAL(Up18RODetail.Qty) AS :qtySum " + "FROM Up18RODetail LEFT JOIN

Re: [sqlite] "unable to open database file" on DROP

2008-08-11 Thread Robert Latest
Thanks, that was it. I don't know exactly how the errors were interrelated, but once I told sqlite (via the PRAGMA thing) to use memory for tmp stuff, all was fine. I'm working under a cygwin environment which seems to be a bit shaky when it comes to system-specific stuff like permissions.

Re: [sqlite] Corrupted database repairing

2008-08-11 Thread Dennis Cote
Alexey Pechnikov wrote: > > Can I get full log of sql statements for to sent it other network or store to > outher device? > Alexey, You may want to read http://www.sqlite.org/cvstrac/wiki?p=UndoRedo for an example of using triggers to generate SQL to modify a database. This example is

[sqlite] setting a foreign key in a trigger

2008-08-11 Thread Bruce Clift
I'm having difficulty writing a trigger in SQLite to do what I need to do. I have very little background in SQL, so I might well be missing something obvious. Any help would be greatly appreciated. I have a table foo with a column that is a foreign key to table bar. Every time a row in foo is

Re: [sqlite] Using TOTAL and AS in the SQL of a Flex app

2008-08-11 Thread Igor Tandetnik
Ross Edwards <[EMAIL PROTECTED]> wrote: > I really don't know where to post this, as it involves both SQLite > and Flex 3, but, I'll try here first. Here's what I have in > FlexBuilder: > > > > sqlText = "SELECT Up18RODetail.ProductID, TOTAL(Up18RODetail.Qty) AS > :qtySum " + You cannot

Re: [sqlite] setting a foreign key in a trigger

2008-08-11 Thread Ken
How about: drop trigger new_bar ; drop table foo; drop table bar; CREATE TABLE bar (id INTEGER PRIMARY KEY AUTOINCREMENT,   text varchar2(255)); CREATE TABLE foo ( id integer primary key,    bar_ref integer REFERENCES bar(id),    text ); CREATE

[sqlite] ANN: SQLite ADO.NET Provider 1.0.56.0

2008-08-11 Thread Robert Simpson
Coinciding with Visual Studio 2008 SP1 going RTM today, I've put out a new version of the SQLite ADO.NET provider. The LINQ bits are fairly solid, but still officially in beta. Nonetheless, it gains the distinction of being the very first ADO.NET provider publically released (other than Sql

Re: [sqlite] Resources for newbies.

2008-08-11 Thread Dennis Cote
David Nelson wrote: > > Getting "logic error or bad data" when using largw data strings: > > > I create the database as follows: > create table Event( Key TEXT[unique], DateTime DATE, Event TEXT, PRIMARY > KEY (Key) ) > This is incorrect and not doing what you want. The unique constraint