Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 6th, 2004, 12:18 PM
Registered User
 
Join Date: Apr 2004
Location: Monterrey, Nuevo Leon, Mexico.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem importing text file

I am treating to read a text file with VB to Access using transfertext command but in some computers only read a single column. I have the problem using XP and Windows 98, I had installed all the patches and and I still having the problem.

I will appreciate your help.

Manuel Trujillo

  #2 (permalink)  
Old April 6th, 2004, 01:36 PM
Authorized User
 
Join Date: Feb 2004
Location: Edmonton, Alberta, Canada.
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I find transfertext unusable for most purposes as it is not possible to do record/field validation. If you can parse a string on delimiters you are much better off writing your own import routine. Have a look at:

http://www-personal.ksu.edu/~sgsax/

follow his downloads link and then open the link to 'File I/O in VB'. The first example shows you how to open and read a file. Add your own field parsing routine depending on how it is delimited. I always use an Access 97 parsing routine as it doesn't rely on string reverse functions or split routines that weren't available in the 97 version for backward compatiblity.

If you write your own routine, you'll never have problems with dll conflicts, uninstalled features, application versions, file name extensions etc. It will just work all the time plus you can provide write validation code to flag incorrectly imported records for manual review.

Ciao
J├╝rgen Welz
Edmonton AB Canada
jwelz@hotmail.com
  #3 (permalink)  
Old April 7th, 2004, 05:36 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have similar problems, my solution was to save import the text by using an specific layout that you can load/save when importing.
Fran

  #4 (permalink)  
Old April 7th, 2004, 09:36 AM
Registered User
 
Join Date: Apr 2004
Location: Monterrey, Nuevo Leon, Mexico.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thnxs for your help, I am working proggramming my own code.

Manuel


Similar Threads
Thread Thread Starter Forum Replies Last Post
importing text file into excel stealthdevil Excel VBA 2 July 10th, 2007 11:28 AM
Importing text file into excel anamarijaf Excel VBA 4 January 27th, 2007 05:50 AM
Importing a text file DBN Beginning VB 6 6 April 24th, 2006 02:52 PM
Importing data from a text file nav PHP How-To 2 March 7th, 2005 02:42 PM
Importing a text file to excel using VB ridders Excel VBA 1 April 10th, 2004 03:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.