Re: how to import fast

From: PF (pf_at_arobas.net)
Date: 08/14/04


Date: Sat, 14 Aug 2004 14:51:29 -0400

thanks for the answer

I think in my case the parsing is the best,
what i want to know is when it comes to add data in access

is there something faster than rst.addnew (add to a recordset)

is there a way to insert say 1000 records in one insert?

Before i was generating a flat text file then import the text file.

Now i don't generate the textfile since i build the tables in access
directly
while normalising them using seek to find already transfer data etc...
It is long and i would like improving the speed.

regards

pf

"John Nurick" <j.mapSoN.nurick@dial.pipex.com> a écrit dans le message de
news:h4ksh0l50oia7nku4kqj2155a5dba8hjv0@4ax.com...
> Hi PF,
>
> It depends on the contents of the file. As you say "printer dump" I
> assume it's got page headers and/or footers, column headers, blank
> lines, and formfeeds. If the actual data lines are all in the same
> format, it's usually possible to filter out all the non-data lines at
> the textfile stage (most quickly done with Perl, awk or whatever),
> leaving a fixed-width textfile which TransferText can handle.
>
> On the other hand if the textfile contains groupings that you have to
> preserve (e.g. if it's a printout of invoices or orders, each with
> several header lines, a variable number of detail lines, and footer
> lines for tax and totals) there's no escape from reading the file line
> by line and parsing each line. In this situation it's sometimes worth
> using textfile tools to parse the file and re-assemble it into two or
> more simple delimited files ready for Access to import, but if you've
> already written working VBA code probably the best thing to do is start
> it running and head for the pub.
>
> On Sat, 14 Aug 2004 10:54:30 -0400, "PF" <pf@arobas.net> wrote:
>
> >I am reading a huge text file to transfer
> >it in access in five tables
> >
> >
> >I read a line, parse it then i create
> >the record with a recordset (no parameter so
> >i suppose it is a dbopentable recordset)
> >command like rst.addnew
> >
> >It is slow. Is there a faster way?
> >like a sql statement or any other type of connection
> >
> >I write in a regular access mdb.
> >
> >I cannot import with a transfertext since the file
> >is a printer dump.
> >
>
> --
> John Nurick [Microsoft Access MVP]
>
> Please respond in the newgroup and not by email.



Relevant Pages

  • Re: how to import fast
    ... is the fastest of the recordset types and using the SEEK is the fastest ... > Now i don't generate the textfile since i build the tables in access ... >> assume it's got page headers and/or footers, column headers, blank ...
    (microsoft.public.access.externaldata)
  • Re: how to import fast
    ... As you say "printer dump" I ... assume it's got page headers and/or footers, column headers, blank ... leaving a fixed-width textfile which TransferText can handle. ...
    (microsoft.public.access.externaldata)
  • Re: Datagrid datasource
    ... DSN-less by using a recordset that is not opening a DB-file, ... but is populated by reading the textfile. ... bound the recordset to a datagrid. ... >I am working on a project that will eventually display data from a file ...
    (microsoft.public.vb.controls)
  • learning how to parse
    ... I want to learn how parsing in general is done. ... textfile that is strucured hierarchical in nodes (like for example an ... ressources (tutorials, free eBooks ....)? ...
    (comp.lang.java.programmer)
  • Re: learning how to parse
    ... Robert Ludewig wrote: ... I want to learn how parsing in general is done. ... > textfile that is strucured hierarchical in nodes (like for example an ... Does anyone know any online ...
    (comp.lang.java.programmer)