Re: ADO Recordset to SQLite

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks, I got the ODBC driver going now and will see if I can do it with INSERT INTO.
I am using this to push data from Interbase to an Access table, so maybe it will work similar with SQLite.

Thanks for the tip about the cache size, will do some experimenting with that.

LR = rs.RecordCount

I know about this and I didn't actually use. I think this came in as RecordCount works in SQLite with the
SQLiteDB dll from TerraInformatica.

While I am at it, what do you use to connect to SQLite? Heard somewhere that the ODBC driver is the one
to go for as it is easy (just use ADO) and fast.

RBS


"Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom> wrote in message news:%23SfOJGzBHHA.992@xxxxxxxxxxxxxxxxxxxxxxx
What is the fastest way to get data from an Interbase database...
I have this code now, which works well, but is a bit slow:

Because you have not set the CacheSize in the Recordset.
If you are using server-sided cursors, vital.
Try some power of 2 like 256, 512 etc.

140 LR = rs.RecordCount

Waste of time. It will be -1 for a ForwardOnlyCursor. See ADO documentation.

I wonder if I could make a construction with INSERT INTO, so pushing data
directly to SQLite, without making a
Recordset first.

You should be able to. If it is many records, you might want to setup a
Command Object and try with multiple INSERTs, passing parameters. I would
not use a Recordset but if you are going to, client-sided using UpdateBatch
and a command similar to

SELECT * FROM yourtable WHERE 0=1
SELECT fld1,fld2... FROM yourtable WHERE 0=1
The 0=1 is the only way of getting an empty Recordset with all field
infomation present suitable to many AddNews. UpdateBatch will then do
multiple INSERTs

Stephen Howe



.



Relevant Pages

  • Re: MDAC 2.8 vs MDAC 2.7
    ... > yield better performance than a less efficient native OLE DB provider. ... > "Val Mazur" wrote in message ... It is not just because it is ODBC driver. ... there are no records in a recordset or it is a bug. ...
    (microsoft.public.data.ado)
  • RE: Protocol Error in TDS Stream vs Network Packet Size
    ... We reported this problem and finally we confirmed that it is a bug. ... For MSQuery, ODBC driver is used which has a problem in retrieving large ... the field definition for the recordset is too large to fit in one ...
    (microsoft.public.sqlserver.connect)
  • Re: Cannot solve complex problem
    ... My users can input several words in random order. ... These words may or may not exist in a database field with this structure ... SQLite comes with a builtin and fast Fulltext-Search-engine, ... In a second pass (looping over the Records in the Recordset) ...
    (microsoft.public.vb.general.discussion)
  • Re: ODBC Connection returns no Data
    ... I'm connecting to an odbc datasource (here: AR System ODBC Driver) ... in a Microsoft Access XP Database with VBA. ... Connection String, the command string and a recordset, open the ...
    (microsoft.public.data.ado)
  • Re: MDAC 2.8 vs MDAC 2.7
    ... an extra layer over an efficiently written ODBC driver can yield ... better performance than a less efficient native OLE DB provider. ... It is not just because it is ODBC driver. ... >>> there are no records in a recordset or it is a bug. ...
    (microsoft.public.data.ado)