[AccessD] Import File From UNIX box

DWUTKA at marlow.com DWUTKA at marlow.com
Thu Jul 29 10:39:44 CDT 2004


You'll need to find out what character it actually is, but then something
like this would work:

Dim f as Long
Dim strTemp as string
f=FreeFile
Open "C:\Import.txt" for binary access read as f
strTemp=Space(LOF(f))
Get f,,strTemp
close f
Kill "C:\Import.txt"
f=FreeFile
strTemp=Replace(strTemp,chr(13),vbCrLf)
Open "C:\Import.txt" for Binary Access Write as f
put f,,strTemp
close f



fourth from the last line has chr(13).  You may need to replace that with
either 8 or 9. (Haven't finished my first cup of coffee...I do know that
between 8,9, and 13 you have CR, LF, and Tab.  Just not awake enough to
remember which is which (I know 13 isn't tab though......I think 8 is.)

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mark A Matte
Sent: Thursday, July 29, 2004 8:48 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Import File From UNIX box


Hello All,

I have an A97 db that imports a text file.  The text file was on a Windows 
box...but now is generated and sent to a UNIX box.  The UNIX version of this

text file has a CR or LF character after each record...and access sees this 
as the end of the file.  Any suggestions in using vba to convert this 
file(or those characters) back to a Windows format/

Thanks,

Mark A. Matte

_________________________________________________________________
Overwhelmed by debt? Find out how to 'Dig Yourself Out of Debt' from MSN 
Money. http://special.msn.com/money/0407debt.armx

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list