Access Project SQL Import csv

S

Sara

Using TransferText command to import .csv file I get the following error:

ODBC-insert on a linked table ??? failed
(Microsoft)(ODBC SQL Server Driver)Fractional truncation(#0)(Microsft)(ODBC
SQL Server Driver)Invalid character value for cast specification(#0)

When i run the File Get External Data Import .csv from Menu bar manually the
import works fine.
docmd.TransferText function produces the error

More background: I copied the main SQL Table (structure only) and am
running TransferText to pull data into this temporary table. In this
temporary table I deleted the ReplicationID field. Some changes will be made
to data in temporary table and then appended to the main table.

Appreciate recommendations... Have used TransferText frequently forimports
and exports with no problem, so I am surprised by this result
 
J

Jack Leach

Are you using a saved import spec with the vba transfer? I'm not positive of
the details myself, but I know this can cause issues if the .csv doesn't have
access's default values for the import specifications (such as delimiter,
field names, etc).

hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
S

Sara

Hi Jack,

I think you are right on with import spec criteria. Since Access tables
import ok with default import, assumed it would also work with SQL table....
obviously not a valid assumption.

Never used a spec criteria with docmd.transfertext but am aware it can be
included in the visual basic command line. Can you tell me briefly how to
create the spec?
 
J

Jack Leach

Can you tell me briefly how to
create the spec?

Unfortunately I've never done it so am not sure of the details. Though if I
remember correctly through other posts here, when you import this using the
wizard there is some way to save it maybe?

I'm not sure... it's a common excersize so I would assume a google search
should return something handy.

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top