Re: Insert ascii into Access
- From: Dale Fye <dale.fye@xxxxxxxxxx>
- Date: Wed, 21 Nov 2007 06:02:01 -0800
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
- Follow-Ups:
- Re: Insert ascii into Access
- From: Kevamer
- Re: Insert ascii into Access
- References:
- Insert ascii into Access
- From: Kevamer
- Re: Insert ascii into Access
- From: Kevamer
- Insert ascii into Access
- Prev by Date: Re: Crosstab Query Error (DB can't find field)
- Next by Date: Re: max no group
- Previous by thread: Re: Insert ascii into Access
- Next by thread: Re: Insert ascii into Access
- Index(es):
Relevant Pages
|