Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV Import field property issue using transfertext

Status
Not open for further replies.

MKH2001

Technical User
Jan 7, 2003
90
0
0
GB
First off
Merry Xmas. But for those of you not yet on your hols, or who are suitably full of seasonal goodwill I have the following problem.

I have a form function which imports csv files into a resultant table.

Code:
DoCmd.TransferText acImportDelim, , "tbl_FlowlineImportCSVTemp", .FoundFiles(i), True

However I just happened to notice on one of the fields (Route) does not import the full values which should be text based, it only imports a seemingly truncated version or I get an numeric field overflow error.

IE T108 imports as 108 whilst T108-VV1 which is another variation that can be expected throws up a numeric field overflow error.

The cvs imports fine if do so manually but since there will be potentially thousands of these files and idea is for an interface for an end user to use without having to import seperately manually isnt really an option.

I am lost as to why it seems to think is a numeric field, the result table is text with a decent enough size format to hold any potential result that should be forthcoming from csv.

And if I LINK or import (using default values without forcing any properties) it also recognises the csv field as text.

Any ideas how I can enforce properties at transfertext command (I can only SEE and issue with the route field but I guess not knowing the reason the problem might exist in other fields not so readily apparent) or any other suggestions how to overcome this.
 
You may use a saved SpecificationName (2nd parameter of the TransferText method).

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Excellent will look at that now. Knew there should be a method but couldnt recall for some reason I was thinking of schemas.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top