Re: Insert ascii into Access

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I'm not familiar with Delphi. Are you saying you want to use Delphi to load
the text file into Access? Why not use Access to do it? As I said, I would
do the import manually the first time, so I could setup the import
specification, but would then do it in code from there on out.

Dale
--
Don''t forget to rate the post if it was helpful!

Email address is not valid.
Please reply to newsgroup only.


"Kevamer" wrote:

My import must be done programmatically with a delphi program.
Thats why i'm looking for the right syntax.

thanks

Kees



"Dale Fye" <dale.fye@xxxxxxxxxx> schreef in bericht
news:200AD8B9-EC95-4312-B2E8-A1C21C89D797@xxxxxxxxxxxxxxxx

If you want to do the import programmatically, check out the TransferText
method in Access help. However, the first time you do it, I strongly
recommend you go through the manual process.

1. From the Main menu, select File -> Get External Data -> Import
2. Select the file you want to import (don't forget to change the file
type
to the Text Files option (*.txt, *.csv, *.tab, *.asc). Click Import
3. Now you should be looking at the Import Text Wizard, which gives you a
couple of options. If you select the Advanced.. button, it will open the
Import Specification window, which allows you to define the field names of
the fields, their data type, whether they should be indexed, and even
allows
you to identify fields to skip. Make sure you save your specification,
because you can use it in the TransferText method. Finish going through
the
wizard to get your first copy of the table. In the future, you can simply
import to this table.

HTH
Dale

--
Don''t forget to rate the post if it was helpful!

Email address is not valid.
Please reply to newsgroup only.


"Kevamer" wrote:

Hi

I'm trying to insert records from a ASCII file to access.
Seen somewhere on the internet that something like this should work :

'SELECT * INTO MyTable '+
'FROM OPENDATASOURCE("Microsoft.JET.OLEDB.4.0,Data
Source=C:\Map;Extended Properties="text;HDR=No") '+
'[FileName#csv]'


Can anybody help me with the exact syntax of this statement. I don't know
where to fill in what.

And is it perhaps also possible to insert records from an ASCII file with
standard record length instead of from a CSV file?

Thanks
Kees






.



Relevant Pages

  • Re: Insert ascii into Access
    ... MSAccess. ... However, the first time you do it, I strongly ... Now you should be looking at the Import Text Wizard, ... the fields, their data type, whether they should be indexed, and even ...
    (microsoft.public.access.queries)
  • Re: VB6, VB2005, or Something Else?
    ... I suggested that MS introduce a SysInt data type for what they now call Integer in VB.Net. ... They have changed the integer size from 16 to 32 bit from Delphi 1.0 to 2.0. ... If so you are programming native Delphi and I don't see that much benefit to compile a VCL application to .NET. ...
    (microsoft.public.vb.general.discussion)
  • Re: Borland snubbing out the hobbyist programmers with Delphi 2005
    ... so far I find VB.Net much closer to the Delphi state of mind ... Just be *very* careful what apps you do in VB.Net. ... Since about VB4 there is a critical mass inside MS that has considered the ... binary data from CP/M versions through VB3 was to use the $tring data type. ...
    (borland.public.delphi.non-technical)
  • Re: Canīt we just vote for a D2005 update 4?
    ... just takes longer to load the first time, which is fine), but, i have ALL ... A Delphi Programming Blog. ... Borland even ... > the Delphi Hall of shame. ...
    (borland.public.delphi.non-technical)
  • Re: Moving from Delphi to C++
    ... to the Delphi Community), I have now moved toward dropping Delphi (after 10+ ... Are you guys seasoned C++ programmers that simply did ... > This isn't the first time this sort of thing has been done. ... You need to actually do your own migration first. ...
    (borland.public.delphi.non-technical)