Re: [sqlite] What is the best way to connect to SQLite from VB/VBA?

2006-11-13 Thread Carlos Avogaro
With the odbc driver, is ease and faster RB Smissaert <[EMAIL PROTECTED]> wrote: Have spent 2 days looking at all the different wrappers and the one ODBC driver and maybe the best one is the commercial dll from Terra... Still, I would be very interested what opinions are about the best (speed, e

Re: [sqlite] Database Corruption and fix suggsted

2006-11-13 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > Hi, > > I am using sqlite 2.8.13 which is supposed to have fix for "Corrupt > problem encountered on Windows NT platform" check this > (http://www.sqlite.org/cvstrac/tktview?tn=599). But the code in pager.c still > has the following rc = write32bits

RE: [sqlite] What is the best way to connect to SQLite from VB/VBA?

2006-11-13 Thread RB Smissaert
Thanks for that. I got this driver going now and will compare it with SQLiteDb.dll from TerraInformatica. Have you come across any problems with the ODBC driver? The author states that there there could be quite a few like memory leaks. Being able to use the same ADO methods etc. with the ODBC driv

RE: [sqlite] sqlite3_table_column_metadata????

2006-11-13 Thread ravi.karatagi
HI All, Below is the code. get_table_data() is giving the expected values.Where as I am not able get meta info of the same. sqlite3 *handle; char *errmsg; const char *datatype; const char *colseq; intNotNull,PrimaryKey,Autoinc; const char *err;

[sqlite] Re: SPAM-LOW: [sqlite] Re: Changing order - why??

2006-11-13 Thread jphillip
On Sun, 12 Nov 2006, Igor Tandetnik wrote: > Ralph Wetzel <[EMAIL PROTECTED]> wrote: > > might it be possible, that someone explains, why anyone would put > > effort in this task? Aren't databases designed to keep data in whatever > > order... :-? > > Imagine you want to store playlists in the da

[sqlite] Newbie sqlite questions: check existence of column

2006-11-13 Thread Florent THIERY
Hi First of all i must say i'm pretty much impressed of how easy it is to buid a sqlite db up within minutes/hours of work. I'm... amazed :) Still, i'm lacking answears. My (soon-to-be-open-source-when-there-will-be-interesting-source-to-open) project is the following: i scan for files recursi

[sqlite] Re: Newbie sqlite questions: check existence of column

2006-11-13 Thread Florent THIERY
I'd add : python import sqlite sqlite.version '1.0.1'

[sqlite] Re: Newbie sqlite questions: check existence of column

2006-11-13 Thread Igor Tandetnik
Florent THIERY <[EMAIL PROTECTED]> wrote: Some files have optional fields, so what i'd like to do is, whenever such a file is scanned and parsed, i want my software to - check first if the column already exists; that, i have no idea how to achieve it PRAGMA table_info: http://sqlite.org/pragma.

Re: [sqlite] sqlite3_table_column_metadata????

2006-11-13 Thread Trevor Talbot
On 11/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: if(sqlite3_table_column_metadata(handle,"temp.db", "temp.db" should be either "main" or NULL. It's used to identify ATTACHed databases (by alias). - T

Re: [sqlite] Re: Newbie sqlite questions: check existence of column

2006-11-13 Thread Florent THIERY
Thanks for this quick reply :) On 11/13/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Florent THIERY <[EMAIL PROTECTED]> wrote: > Some files have optional fields, so what i'd like to do is, whenever > such a file is scanned and parsed, i want my software to > - check first if the column already

[sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread Gunnar Roth
Hello, i want to use sqlite3 in a sub-project at work. when compiling with warning level 4 with vc6 ( internal philosophy ) , i get over 480 warnings. With warning level 3 there are still 119 left. This leads to problems to convince the project lead of the quality of sqlite3 ( which i do not doubt

Re: [sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread drh
Gunnar Roth <[EMAIL PROTECTED]> wrote: > Hello, > i want to use sqlite3 in a sub-project at work. > when compiling with warning level 4 with vc6 ( internal philosophy ) , i > get over 480 warnings. With warning level 3 there are still 119 left. > This leads to problems to convince the project lead

Re: [sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread Clay Dowling
First, I use the pre-built DLL from the SQLite web site, and then use my compiler's library import utility to generate the appropriate import lib. That saves me all the warnings. Second, examine the actual warnings, not just the count. You'll find that a large number of them are warnings about d

[sqlite] Handling null characters in blob data

2006-11-13 Thread Shivshankar Subramani - TLS , Chennai
Hi all, > SQLite version 2.8 and earlier could not (easily) store binary > data - data with embedded \000 characters. Thus the encode/decode > routines were provide to transform data so that it contained no > \000 characters. > > SQLite version 3.0 can store binary data without difficulty. This

[sqlite] Re: so many warnings on vc6 with warning level 4

2006-11-13 Thread Igor Tandetnik
Clay Dowling wrote: Second, examine the actual warnings, not just the count. You'll find that a large number of them are warnings about deprecated library methods such as strcpy. Not with VC6 (which the OP is using). These deprecation warnings are new with VC8 (aka VC 2005), and are easy to

[sqlite] Re: Handling null characters in blob data

2006-11-13 Thread Igor Tandetnik
Shivshankar Subramani - TLS , Chennai <[EMAIL PROTECTED]> wrote: Hi all, SQLite version 2.8 and earlier could not (easily) store binary data - data with embedded \000 characters. Thus the encode/decode routines were provide to transform data so that it contained no \000 characters. SQLite ver

[sqlite] Re: Re: Newbie sqlite questions: check existence of column

2006-11-13 Thread Igor Tandetnik
Florent THIERY <[EMAIL PROTECTED]> wrote: On 11/13/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Florent THIERY <[EMAIL PROTECTED]> wrote: Some files have optional fields, so what i'd like to do is, whenever such a file is scanned and parsed, i want my software to - check first if the column a

Re: [sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread Christian Smith
Gunnar Roth uttered: Hello, i want to use sqlite3 in a sub-project at work. when compiling with warning level 4 with vc6 ( internal philosophy ) , i get over 480 warnings. With warning level 3 there are still 119 left. This leads to problems to convince the project lead of the quality of sqlite3

Re: [sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread Teg
Hello Gunnar, You can use this pragma to disable the warnings that don't actually mean anything. #pragma warning (disable: 4786 4666 4100 4786 4146) I debug/develop using VC2005 and release using VC6. C Monday, November 13, 2006, 9:43:02 AM, you wrote: GR> Hello, GR> i want to use sqlite3 in

Re: Re: [sqlite] Database Corruption and fix suggsted

2006-11-13 Thread jayanth KP
Hi Richard, I downloaded the sqlite-2.8.17.bin from sqlite.org (sqlite-2.8.17.bin.gz) and ran it on media.vdb.corrupt. I am getting the following error . I am confused how were you able to open this file. Plz open media.vdb.corrupt. ---

Re: [sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread Noel Frankinet
Christian Smith a écrit : Gunnar Roth uttered: Hello, i want to use sqlite3 in a sub-project at work. when compiling with warning level 4 with vc6 ( internal philosophy ) , i get over 480 warnings. With warning level 3 there are still 119 left. This leads to problems to convince the project lea

Re: [sqlite] Database Corruption and fix suggsted

2006-11-13 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > Hi Richard, > I downloaded the sqlite-2.8.17.bin from sqlite.org (sqlite-2.8.17.bin.gz) > and ran it on media.vdb.corrupt. I am getting the following error . I am > confused how were you able to open this file. Plz open media..vdb.corrupt. > Once a

RE: [sqlite] What is the best way to connect to SQLite from VB/VBA?

2006-11-13 Thread RB Smissaert
Have done one simple test now and for now it looks SQLiteDB is about twice as fast as the ODBC driver. I am a novice with SQLite, so maybe my test is no good and in that I am interested to know. I have tested on a large file (few millions rows and 19 fields) and I have set an index on the field to

[sqlite] Format change to fts2 module.

2006-11-13 Thread Scott Hess
http://www.sqlite.org/cvstrac/chngview?cn=3511 This changes the storage to delta-encode docids, rather than storing them in absolute form. Unfortunately, since this changes the format of the backing data, if you've been experimenting with fts2 databases, you'll have to regenerate them (see the e

[sqlite] INSERT INTO with SELECT

2006-11-13 Thread RB Smissaert
Trying to move data from Interbase to SQLite via the ODBC driver and ADO and having trouble to get the right syntax for the INSERT INTO statement. This is what I have now, but it fails with the error: only one SQL statement allowed. Sub InsertIntoSQLLite() Dim cn As SQLiteDb.Connection Di

[sqlite] Trouble with Trigger

2006-11-13 Thread A.J.Millan
I want know if is possible to do a DELETE, INSERT or UPDATE statement from inside a TRIGGER. Let's say: CREATE TABLE tableA ( Id INTEGER, ... ); CREATE TABLE tableB ( Ref INTEGER, ... ); CREATE TRIGGER DeleteReferences BEFORE DELETE ON tableA BEGIN SELECT CASE WHEN (SELECT count(*) F

Re: [sqlite] Trouble with Trigger

2006-11-13 Thread Dennis Cote
A.J.Millan wrote: I want know if is possible to do a DELETE, INSERT or UPDATE statement from inside a TRIGGER. Any idea in this respect, or alternative, will be grateful See the documentation at http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers for a complete description of such tr

[sqlite] Re: Trouble with Trigger

2006-11-13 Thread Igor Tandetnik
A.J.Millan <[EMAIL PROTECTED]> wrote: I want know if is possible to do a DELETE, INSERT or UPDATE statement from inside a TRIGGER. Yes. Otherwise a trigger would be rather pointless. Let's say: CREATE TABLE tableA ( Id INTEGER, ... ); CREATE TABLE tableB ( Ref INTEGER, ... ); CREATE T

Re: [sqlite] INSERT INTO with SELECT

2006-11-13 Thread Jay Sprenkle
On 11/13/06, RB Smissaert <[EMAIL PROTECTED]> wrote: Trying to move data from Interbase to SQLite via the ODBC driver and ADO and having trouble to get the right syntax for the INSERT INTO statement. This is what I have now, but it fails with the error: only one SQL statement allowed. I notice

Re: [sqlite] Newbie sqlite questions: check existence of column

2006-11-13 Thread Jay Sprenkle
On 11/13/06, Florent THIERY <[EMAIL PROTECTED]> wrote: - check first if the column already exists; that, i have no idea how to achieve it Hello Florent, Try this: select * from sqlite_master; This gives a lot of interesting info about tables and indices. -- SqliteImporter and SqliteReplicator

RE: [sqlite] INSERT INTO with SELECT

2006-11-13 Thread RB Smissaert
OK, thanks for the reply. I am using the same construction to write directly from Interbase to Access and that works fine. I can make an ADO recordset first from the Interbase data and write that to SQLite in a (double) loop, but it is a bit slow. Maybe I should write to text first (which is quite

RE: [sqlite] Re: Handling null characters in blob data

2006-11-13 Thread Shivshankar Subramani - TLS , Chennai
Hi Igor Tandetnik, I did follow the procedure to store the blob data.I have no problem in excuting it but my problem is that when my data is of the below type in memory PK. ...¸Zn5 >À~Õe.. .è. ..simpl e.datUT ...¨¦YE ¨¦YE¨¦Y í'KNÃ0 .?S6Hoe *}ã.6U.. Where there are lots of null character i