Hello,
I have processes that access to my database, one writing on it and the other
just reading. when this case take place an error message occure saying that
database is locked.
I saw in sqlite3 docs that sqlite3 enable this type of access but i don't
know how can I activate this option.
Is
How do I enable shared locking?
2007/1/25, Ken <[EMAIL PROTECTED]>:
From os_unix.h:... After reading this, locking makes more sense!
Although the Lock may physically be an exclusive lock, the
implementation is actually a logcially "SHARED" lock.
/* The following describes the
On Feb 2, 2007, at 8:59 AM, Clark Christensen wrote:
FWIW, I'm not convinced Samba has locking working correctly. Using
a very recent Samba version, I managed to corrupt a SQLite database
last fall by (I think) doing simultaneous writes from the Linux host
box, and my WinXP client box
Hello
Please can you tell me how can i avoid having error message "database is
locked'?
thanks
Hi,
I'm using SQLite with a PHP program and I would like to execute this SQL
request : DROP TABLE IF EXISTS clients;
See my code :
$allsqls=<<$sqlite = sqlite_open('pac.sdb') or die ('Impossible de se connecter a
la base SQLite');
//Création des tables dans la base SQLite
A client of mine reported a problem with a malformed DB.
I tried to recovery the DB but without success.
If I edit the file with an hex editor I see any data, but using sqlite I
can't access it.
>sqlite3 data.sqlite
SQLite version 3.3.12
Enter ".help" for instructions
sqlite> PRAGMA
Joe Wilson wrote:
--- Dennis Cote <[EMAIL PROTECTED]> wrote:
On 2/3/07, Tom Shaw <[EMAIL PROTECTED]> wrote:
SQLSTATE[HY000]: General error: 1 SQL logic error or missing database
and
SQLSTATE[HY000]: General error: 8 attempt to write a readonly database
Tom what wrapper are you
WB Stow wrote:
Does anyone have a BNF file (http://en.wikipedia.org/wiki/Backus-Naur_form)
for SQLite3? I want to generate a parser with it.
If not, I guess I can start with the SQL92 BNF that I have and add the
sqlite3 stuff to it...
Wayne,
The documentation at
anis chaaba wrote:
Hello
Please can you tell me how can i avoid having error message "database is
locked'?
thanks
You will have to provide more details about exactly what you are doing
and how you are doing it for anybody to be able to assist you.
SQLite does support multiple process
Cecilia VIGNY wrote:
Why ? Can't we use "IF EXISTS" with php ? Does another solution exist ?
What version of sqlite are you using? You can check with
select sqlite_version();
The IF EXISTS clause was added to SQLite in version 3.3.8. Older version
will not accept that syntax.
HTH
Cecilia VIGNY
wrote:
I'm using SQLite with a PHP program and I would like to execute this
SQL request : DROP TABLE IF EXISTS clients;
When I test my program, this error occures :
Warning: sqlite_query(): near "EXISTS": syntax error in on line
61
IF EXISTS clause is supported with
I have multiple thread reading the database and a thread inserting in or
updating the database.
when i try to simulate this case by executing sqlite3 from shell by
beginning a transaction from a shell and retrieving data from other shell
eveything works fine.
But when it's the cas from my C
anis chaaba <[EMAIL PROTECTED]> was heard to say:
> I have multiple thread reading the database and a thread inserting in or
> updating the database.
> when i try to simulate this case by executing sqlite3 from shell by
> beginning a transaction from a shell and retrieving data from other shell
>
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2007-02-04 13:35]:
> "A. Pagaltzis" <[EMAIL PROTECTED]> wrote:
> > It's a pity that INSERT OR IGNORE (apparently?) does not set
> > last_insert_id properly regardless of outcome,
>
> Consider this case:
>
> CREATE TABLE t1(x INTEGER PRIMARY KEY, y
Igor Tandetnik wrote:
IF EXISTS clause is supported with SQLite v3.3.0 and up.
Igor,
Right you are, version 3.3.0.
I was mistakenly looking at the entry for IF EXISTS on create and drop
of triggers and views, that didn't happen until 3.3.8. Sorry if I caused
any confusion.
Dennis Cote
I can't read more then 2KB from text column. I use
http://www.codeproject.com/ce/SQLite3Wrapper.asp and compile dll library
from newest sqlite source. I use VS 2005 and target platform is wm5
pocketpc (arm). Other test application on .net cf with .net library (not
original source) and sqlite3
I would use the existing parser if my program were written in C, but it's
not. I will look at it as a reference when writing the BNF though.
Through my search I could see that this is not the first time that this
question has been asked. So, once I'm done I will provide you all with the
file.
You cannot avoid it if you have competing processes accessing the same
database. What you have to do is synchronize access in your code.
anis chaaba wrote:
Hello
Please can you tell me how can i avoid having error message "database is
locked'?
thanks
If you can find a way of dropping a table which doesn't exist, use it.
Otherwise just drop the table.
Cecilia VIGNY wrote:
Hi,
I'm using SQLite with a PHP program and I would like to execute this SQL
request : DROP TABLE IF EXISTS clients;
See my code :
$allsqls=<<$sqlite =
On 2/5/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2007-02-04 13:35]:
> "A. Pagaltzis" <[EMAIL PROTECTED]> wrote:
> > It's a pity that INSERT OR IGNORE (apparently?) does not set
> > last_insert_id properly regardless of outcome,
>
> Consider this case:
>
Shane Harrelson wrote:
However, in an effort to provide some useful performance data for
everyone, I'm making available the results of my testing with the
various suggested insertion algorithms below. The fastest was my
"Hack" version, followed closely by the "Insert/Select/Insert" version
I have multiple thread reading the database and a thread inserting in or
updating the database.
when i try to simulate this case by executing sqlite3 from shell by
beginning a transaction from a shell and retrieving data from other shell
eveything works fine.
But when it's the cas from my C
I have 2 table:
1. Table A :
no INTEGER PRIMARY KEY,
name varchar(15);
2. Table B :
no smallint, (Foreign key)
Address varchar(20);
Telpvarchar(10);
Usually I use this step when I save data :
- insert A (name) VALUES ("Mr.X");
- x = Select no_id FROM A where name =
Andrew,
Nice modification.. Did you buy any chance post this into the sqlite ticketing
system?
It would be nice if sqlite would let you acquire a shared lock via the BEGIN
statement.
Andrew Teirney <[EMAIL PROTECTED]> wrote: > I have multiple thread reading the
database and a
Andrew,
Nice modification.. Did you buy any chance post this into the sqlite ticketing system?
It would be nice if sqlite would let you acquire a shared lock via the BEGIN statement.
No i didn't actually post this to the ticketing system, to be honest i
am very new to all this open
Hariyanto <[EMAIL PROTECTED]> wrote:
I have 2 table:
1. Table A :
no INTEGER PRIMARY KEY,
name varchar(15);
2. Table B :
no smallint, (Foreign key)
Address varchar(20);
Telpvarchar(10);
Usually I use this step when I save data :
- insert A (name) VALUES ("Mr.X");
- x =
Shane Harrelson wrote:
Perform 50 transactions of 1000 inserts each (5 total).
Shane,
Is this your normal usage pattern? Inserting records in blocks of around
1000 per transaction. Or would you be more likely to insert using 1000
transactions of 50 records, or perhaps only a single
Can you give me sample code how to use it?
I still not understand when I read capi3ref.html
thx.
On Mon, 5 Feb 2007 18:36:04 -0500
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> Hariyanto <[EMAIL PROTECTED]> wrote:
> > I have 2 table:
> >
> > 1. Table A :
> > no INTEGER PRIMARY KEY,
> > name
Thank you , Joe Wilson.
2007/2/3, Joe Wilson <[EMAIL PROTECTED]>:
--- chueng alex1985 <[EMAIL PROTECTED]> wrote:
> I don't think so. If the field has been indexed, searching speed will be
> imprved very much. The query "f1 = value1 OR f1 = value2 OR f1=value3 OR
> ..." will be faster if the
On 2/5/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
Shane Harrelson wrote:
> Perform 50 transactions of 1000 inserts each (5 total).
>
Shane,
Is this your normal usage pattern? Inserting records in blocks of around
1000 per transaction. Or would you be more likely to insert using 1000
Hi all,
I encountered a problem. I have two servers (A and B) which host two same
DBs, each of them may be modified. If the DB has been modified on server A,
the DB on server B should also keep synchronized with server A. If the DB on
server B has been modified, the DB on server A should also be
http://www.mail-archive.com/sqlite-users@sqlite.org/msg19628.html
--- Alex Cheng <[EMAIL PROTECTED]> wrote:
> I encountered a problem. I have two servers (A and B) which host two same
> DBs, each of them may be modified. If the DB has been modified on server A,
> the DB on server B should also
--- Shane Harrelson <[EMAIL PROTECTED]> wrote:
> On 2/5/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
> > Shane Harrelson wrote:
> > > Perform 50 transactions of 1000 inserts each (5 total).
> > >
> >
> > Shane,
> >
> > Is this your normal usage pattern? Inserting records in blocks of around
>
--- Andrew Teirney <[EMAIL PROTECTED]> wrote:
> If you are interested in the "BEGIN SHARED" transaction i posted a
> simple patch to this mailing list within the last month if i recall
> correctly.
http://www.mail-archive.com/sqlite-users@sqlite.org/msg21260.html
Do you find that using this
On 2/5/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
--- Shane Harrelson <[EMAIL PROTECTED]> wrote:
> On 2/5/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
> > Shane Harrelson wrote:
> > > Perform 50 transactions of 1000 inserts each (5 total).
> > >
> >
> > Shane,
> >
> > Is this your normal
--- Shane Harrelson <[EMAIL PROTECTED]> wrote:
> On 2/5/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
> > > Yes, it's typical. Each database instance is typically composed of
> > > around 50k records, all inserted in a single pass. If I could do
> > > larger transactions (or not do them at all) I
36 matches
Mail list logo