Re: AW: [sqlite] VB6 question

2005-07-28 Thread RAY BORROR
I am using SQLite Plus sucessfully Ray Borror Gregory Letellier <[EMAIL PROTECTED]> wrote: all the wrapper ar for 2.8 and i wan't use the 3.0 anyone known 3.0 wrapper ? Steve O'Hara a écrit : >Don't want to dampen your enthusiasm for this route but. why do you >think there are so many VB

[sqlite] Quick start example contains possible memory leak: zErrMsg

2005-07-28 Thread mike . chirico
I believe the following quick start example contains a possible memory leak. This is the program found at the following link: http://www.sqlite.org/quickstart.html The error can be reproduced by compiling the example and running it for the following SQL statement: ./a.out tmptable

Re: [sqlite] How to get the size of the value

2005-07-28 Thread Shawn Walker
Dennis Cote wrote: Shawn Walker wrote: How do I determine the size of the value of the string/blob that is in the database? I would like to know how big the data so that I can determine how to handle the data if it's a large data so that I can put the data in a file instead of in memory.

Re: [sqlite] How to get the size of the value

2005-07-28 Thread Dennis Cote
Shawn Walker wrote: How do I determine the size of the value of the string/blob that is in the database? I would like to know how big the data so that I can determine how to handle the data if it's a large data so that I can put the data in a file instead of in memory. Shawn, You can use

Re: [sqlite] timeout question

2005-07-28 Thread Christian Smith
On Thu, 28 Jul 2005, Ray Mosley wrote: >I am accessing a SQLite 2.8 database from an application running several >Windows systems systems using a NFS shared file. I am using the Tcl bindings >- TclPro 1.4.1. > The default timeout is set to 0; if I want to delay up to two seconds if >the DB is

[sqlite] How to get the size of the value

2005-07-28 Thread Shawn Walker
How do I determine the size of the value of the string/blob that is in the database? I would like to know how big the data so that I can determine how to handle the data if it's a large data so that I can put the data in a file instead of in memory. Thanks, Shawn

[sqlite] How do I backup sqlite data file

2005-07-28 Thread Koji Namekata
Hi, What is the most reasonable way to backup sqlite data file? When applications using that db file are stopped, simple file copy `cp active.db backup.db' works fine. But with long running applications, is it correct to assume asynchronous copy may result in inconsitent state of the db file,

[sqlite] timeout question

2005-07-28 Thread Ray Mosley
I am accessing a SQLite 2.8 database from an application running several Windows systems systems using a NFS shared file. I am using the Tcl bindings - TclPro 1.4.1. The default timeout is set to 0; if I want to delay up to two seconds if the DB is locked, does each application need to set the

RE: AW: [sqlite] VB6 question

2005-07-28 Thread Steve O'Hara
Attached (now in the WIKI) is a VB6 wrapper that is a bit different to most in that it binds to the sqlite DLL at runtime. Consequently, all you need to do is put this in your path along with the sqlite3.dll (or sqlite.dll if you want to use 2.8.x) and it sorts out the calls at runtime. The DLL

Re: [sqlite] problem of creation of a data base

2005-07-28 Thread LURKIN Denis
Thank you for your assistance, all functions very well thanks to you! I had to add: extern "C" { #include "os.h" } Excuse me if I have a little difficulties of understanding, I am newbie with Sqlite. Yours sincerely, Denis Lurkin.

Re: [sqlite] Commit and Rollback

2005-07-28 Thread Will Leshner
On Jul 28, 2005, at 4:29 AM, Edwin Knoppert wrote: And i wish for a test if the transaction is already set or not, without using a callback. You already can: " int sqlite3_get_autocommit(sqlite3*); Test to see whether or not the database connection is in autocommit mode. Return TRUE

Re: [sqlite] problem of creation of a data base

2005-07-28 Thread Gerald Dachs
> I tested with: > > extern "C" > { > #include > } > > but I always have the following error: > > ZeroLink: unknown symbol '__Z21sqlite3OsFullPathnamePKc' > > What to make? I have expected that the definition is in sqlite3.h, what is not the case. Try it with "os.h". Anway, I believe that

Re: [sqlite] problem of creation of a data base

2005-07-28 Thread Gerald Dachs
> I added: > > extern "C" > { > #include > } I wrote this in the moment when the loudspeakers at the walls told us all to leave the building, because of a technical problem. > and I have a problem of compilation: > > sqlite.h: No such file or directory > > > I tested with: > > extern "C" > { >

Re: [sqlite] problem of creation of a data base

2005-07-28 Thread LURKIN Denis
I added: extern "C" { #include } and I have a problem of compilation: sqlite.h: No such file or directory I tested with: extern "C" { #include } but I always have the following error: ZeroLink: unknown symbol '__Z21sqlite3OsFullPathnamePKc' What to make? Thank you. Denis Lurkin.

Re: [sqlite] problem of creation of a data base

2005-07-28 Thread Gerald Dachs
> Hello, > > I receive this error: > > ZeroLink: unknown symbol '__Z21sqlite3OsFullPathnamePKc' > > Why? name mangling, use: extern "C" { #include } Gerald

Re: [sqlite] Multi-threading.

2005-07-28 Thread Eli Burke
Mrs. Brisby wrote: > My PII-350 easily handles 2 million local deliveries per hour, and it > fork()s for each one. > > As has been mentioned: If you think threads are going to make your > program fast, you don't know what you're doing. Like it or not, the world is bigger than just Unix. Some of

Re: [sqlite] Multi-threading.

2005-07-28 Thread Dennis Jenkins
Mrs. Brisby wrote: meanwhile, two threads attempting to multiplex access to a single sqlite handle are a) bound to be confused, and b) need those resource locks anyway. (background: I've been using threads on win32 since 1998. Sometimes to spread load across multiple CPUs, but usually

[sqlite] problem of creation of a data base

2005-07-28 Thread LURKIN Denis
Hello, I created a new project to which I included all the source files SQLITE 3.2.2 I have make a class DATABASE in which I created a method to create the base of data. int SqliteDatabase::create(const char *DbName) { int readOnly = 0; int rc = 0; char *zFullPathname =

RE: [sqlite] UPDATE - crash when many columns

2005-07-28 Thread Christian Smith
On Thu, 28 Jul 2005, Mark Allan wrote: > > >Thanks for the replies. > >My first assumption was that it was a memory issue. It seems that this is >only a problem with an UPDATE command, we do not have the same problem >when using the INSERT command with the same number of columns. Will the >UPDATE

Re: AW: [sqlite] VB6 question

2005-07-28 Thread Gregory Letellier
all the wrapper ar for 2.8 and i wan't use the 3.0 anyone known 3.0 wrapper ? Steve O'Hara a écrit : Don't want to dampen your enthusiasm for this route but. why do you think there are so many VB wrappers for SQLite? It's because you can't use the SQLite DLL directly from VB - some

RE: AW: [sqlite] VB6 question

2005-07-28 Thread Steve O'Hara
Don't want to dampen your enthusiasm for this route but. why do you think there are so many VB wrappers for SQLite? It's because you can't use the SQLite DLL directly from VB - some functions will work but the essential ones won't. It's because the DLL returns things like pointers to arrays

Re: [sqlite] Sorry, trivail question probably, chr(0) in blob.

2005-07-28 Thread Edwin Knoppert
Sorry for asking, but is there a read blob for this without binding? At this moment i'm using ..GetTable() and seems to offer only null terminated strings. - Original Message - From: "Christian Smith" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 27, 2005

Re: [sqlite] Sorry, trivail question probably, chr(0) in blob.

2005-07-28 Thread Edwin Knoppert
Wow, super! I made a very fast converter for that so.. Thanks! - Original Message - From: "Christian Smith" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 27, 2005 6:13 PM Subject: Re: [sqlite] Sorry, trivail question probably, chr(0) in blob. On Wed, 27

Re: [sqlite] Commit and Rollback

2005-07-28 Thread Edwin Knoppert
And i wish for a test if the transaction is already set or not, without using a callback. Even better, nested tranactions would be the best. :) - Original Message - From: "Marco Bambini" <[EMAIL PROTECTED]> To: Sent: Thursday, July 28, 2005 9:24 AM Subject:

Re: [sqlite] No Timeout during commit?

2005-07-28 Thread D. Richard Hipp
On Mon, 2005-07-25 at 12:34 -0700, R S wrote: > Hi, >I have 2 process accessing the DB, one reading and the other > writing. Often the process reading the DB could take long and could > block the other process from committing a bunch of records to the DB. > I noticed that when the reader

Re: [sqlite] UPDATE - crash when many columns

2005-07-28 Thread D. Richard Hipp
On Wed, 2005-07-27 at 16:52 +0100, Mark Allan wrote: > I seem to have a problem when I update more than 6 columns within a > single record at one time. All columns are in the same table, they are > either strings, integers or dates. > I just ran a test where create a table with 1 columns,

RE: [sqlite] UPDATE - crash when many columns

2005-07-28 Thread Mark Allan
Thanks for the replies. My first assumption was that it was a memory issue. It seems that this is only a problem with an UPDATE command, we do not have the same problem when using the INSERT command with the same number of columns. Will the UPDATE command require more memory to execute? My

Re: [sqlite] round ?

2005-07-28 Thread Nicolas Martin
Oops, i didn't check cvstrack Many thanks ! Nicolas D. Richard Hipp wrote: On Thu, 2005-07-28 at 08:37 +0200, Nicolas Martin wrote: Some strange effect of the round expression : sqlite> select round(1-0.5); 0 sqlite> select round(2-0.5); 2 See

Re: [sqlite] round ?

2005-07-28 Thread D. Richard Hipp
On Thu, 2005-07-28 at 08:37 +0200, Nicolas Martin wrote: > Some strange effect of the round expression : > > sqlite> select round(1-0.5); > 0 > sqlite> select round(2-0.5); > 2 See http://www.sqlite.org/cvstrac/tktview?tn=1316. The problem results from inconsistent behavior in platform printf()

[sqlite] Accessing Database on Network

2005-07-28 Thread djm
Hello, The documentation suggests that its unsafe to use SQLite when the database file is on a windows network server and various other machines may want to simultaneously access it. If however none of these machines change the data in the databse (all accesses are just queries) is it then

Re: [sqlite] round ?

2005-07-28 Thread Nicolas Martin
My version in sqlite3 v3.22 on freebsd5.4 I will check on Windows on the same computer. Damian Slee wrote: I tried it on windows for you. sqlite3.exe v3.21 sqlite> select round(1-0.5); 1 sqlite> select round(2-0.5); 2 sqlite> select round(3-0.5); 3 sqlite> select round(4-0.5); 4 sqlite>

[sqlite] Commit and Rollback

2005-07-28 Thread Marco Bambini
I need to know when a commit or a rollback is executed, I know that I can use the sqlite_commit_hook routine to be notified of a commit command, but what about rollback? Is there a way to know (or to be notified) when a rollback happens? Thanks a lot for your help, Marco Bambini

RE: [sqlite] round ?

2005-07-28 Thread Damian Slee
I tried it on windows for you. sqlite3.exe v3.21 sqlite> select round(1-0.5); 1 sqlite> select round(2-0.5); 2 sqlite> select round(3-0.5); 3 sqlite> select round(4-0.5); 4 sqlite> select round(5-0.5); 5 sqlite> select round(6-0.5); 6 Maybe the math libarary on the C compiler you are using?

[sqlite] round ?

2005-07-28 Thread Nicolas Martin
Some strange effect of the round expression : sqlite> select round(1-0.5); 0 sqlite> select round(2-0.5); 2 sqlite> select round(3-0.5); 2 sqlite> select round(4-0.5); 4 sqlite> select round(5-0.5); 4 sqlite> select round(6-0.5); 6 sqlite>