Rejected characters on text transfer

  • Thread starter Thread starter Anna
  • Start date Start date
A

Anna

I am trying to transfer from a text file into an Access
2003 database. I have the field defined as text and when
I import a numeric value with a fraction it doesn't
import. It also ignores the (") sign after the fractions.
As you can tell I am trying to import a field which is a
measurement. Doesn't ayone know how to get around this?
Any help is appreciated.
 
You don't mention what kind of text file it is.
Fixed width or delimited.
Try using a delimited file and use a | or other delimiter to separate the
fields. Then it should work for all data between delimiters.
 
I am using a comma delimited file from a VB.Net program.
I don't now if changing from a comma to a different
delimieter will work. I would force a constant in my
writeline in VB but unfortunately not all the entries in
the field are in inches or feet.(") or('). Any other
suggestions?
 
I am using a comma delimited file created by VB.Net. I have tried other delimeters to no avail. I am also finding that it rejects text that is in the form of a fraction. Any ideas about that one?
 
I just tried it and it worked fine.

This is my test file: (note the last entry is a fraction)

"CategoryID";"CategoryName";"Description";"Picture"
1;"Beverages";"Soft drinks, coffees, teas, beers, and ales";
2;"Condiments";"Sweet and savory sauces, relishes, spreads, and seasonings";
3;"Confections";"Desserts, candies, and sweet breads";
4;"Dairy Products";"Cheeses";
5;"Grains/Cereals";"Breads, crackers, pasta, and cereal";
6;"Meat/Poultry";"Prepared meats";
7;"Produce";"Dried fruit and bean curd";
8;"Seafood";"Seaweed and fish";
9;"3 1/2";"test fractions";

--
Joe Fallon
Access MVP



Anna said:
I am using a comma delimited file created by VB.Net. I have tried other
delimeters to no avail. I am also finding that it rejects text that is in
the form of a fraction. Any ideas about that one?
 
Hi Anna,

It sounds as if the problem is being caused by a quote mark " being used
for an inch symbol, in a field delimited (qualified) by quote marks.
E.g. if the data is
3 1/2"
it's appearing in the text file like this:
"Other field","3 1/2"","Next field"

If that's the case, you could do one of the following::

-Use the Unicode double prime character (U+2033) for the inch symbol.
This is typographically better anyway, usually.

-Remove the " " delimiters (which you can only do if the field-separator
character will never appear in the data); if necessary, use a different
field separator.

-Double each of the inch symbols, e.g.
"Other field","3 1/2""","Next field"
 
Back
Top