Re: ADO Recordset to SQLite



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: Using Recordset.State Property
    ... In this situation, you do not have multiple instances, there is only one ... If the recordset is being used for two or more distinct purposes, ... I do not have another declaration, ... >> Worked fine for me when I declared the rs as Public in a Standard Module ...
    (microsoft.public.access.formscoding)
  • Re: Updating a field on a continous form
    ... the multiple copies of the form that you see are really multiple ... Although the diplayed recordset data ... > I have a problem whereby I have a continuous form ... If I set this field Unboundfield = ...
    (microsoft.public.access.forms)
  • Re: Datagrid multiple row selections
    ... > It is possible to press Ctrl and make multiple selections of separate rows ... ' First you'll need to make a clone of the recordset that's bound to the ... the bookmarks will not be ...
    (microsoft.public.vb.database.ado)
  • Re: DataSet.Clear required before loading new data?
    ... I am actually using the same dataset over & over for multiple uses. ... With an ADO recordset, once the recordset was closed then I could use it for ... > Here's a summary of the rules to have it refresh vs fill over again: ... > If primary key information is present, ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: CopyFromRecordset Question
    ... multiple xl sheets? ... "parityd" wrote: ... This works fine if the recordset has ... > onto 3 worksheets. ...
    (microsoft.public.excel.programming)