import error

A

a

Dear all I have a problem when Importing .CSV Files to Access data base

My Problem is:

When Importing field contain text and number the access data (discard) (rid)
the text value and display only number value

What I mean access 2003 thing that the field contain number only so discard
the text value

Example



My_filed_that_contain_text_and_numbers

1

A

2

C

3

Fsd

And so on



Access do that

My_filed_that_contain_text_and_numbers

1

2

3



And create table name import error (Type Conversion Failure)



My code is :



DoCmd.TransferText acImportDelim, "", "MyTable", Mypath, True, ""
 
J

Jeanette Cunningham

a,
yes, this is normal behavior when importing to a field of number data type.
Access won't put text in a field of number data type.
If you are using the wizard, you can use the advanced button the import
wizard to tell the import process how to set up the import field types.
Or
Make a text data type field to hold the import of the data with mixed text
and numbers.
This will let you import both text and numbers into the same field.

Jeanette Cunningham
 
A

a

Jeanette Cunningham
thank you
i'm not using the wizard i'm using this command:

DoCmd.TransferText acImportDelim, "", "MyTable", Mypath, True, ""
 
J

Jeanette Cunningham

The main problem with the import is that you have both numbers and text in
the same field or column.
Access doesn't like that and will not import the text unless you are
importing the text into a text field.

No matter how you import this particular file, you will still have the
problem that access won't put text into a field where the data type is
number.
I assume you are importing to an existing table.
You have some choices:
change that field in the table to a text data type (this might not be
possible)
create a new table to hold the imported data
make sure there is a text field to hold that data that has both
numbers and text in the same field
Append the data from the new table to your table.
You will need to decide what to do about those text values that previously
went into the errors table for type conversion.

Jeanette Cunningham
 

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