If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Linefeeds & Carriage returns

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-04, 04:00
namliam namliam is offline
Registered User
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 421
Linefeeds & Carriage returns

This really is a windows problem, but its Unix related. I am hoping to find a kindred spirit who can help me....

=> I know I can use a sed to add the ^M to the line end, but in my customer does not have a Unix environment. The supplying party is unwilling at the moment to help us. <=

In text files created by Unix a line ends (and in those cases the record) with a linefeed (chr(10)) If you then want to import the file into access it sees it as 1 long line.
Now i have found that to be a major pain, and one can work around by reading the file character by character. This however causes the import to take a very long time.

Also i have noticed that in a certain environment, using A2k sp-3 on a win 2k machine access will accept the chr(10) as the "carriage return" thus importing the file properly. On other systems tho, NT/A97 and XP/AXP, it sees it as one line.

Does anyone have any info on the how when and why of this? I tried googling, MSDN and searching on the forum, but could not find anything trully relevant. Except maybe that Access should see it as 1 line, except for the earliest version (2).

Anybody?

Thanx
Reply With Quote
  #2 (permalink)  
Old 12-09-04, 10:19
ducasio ducasio is offline
Registered User
 
Join Date: Aug 2004
Location: Rome, Italy
Posts: 81
Linefeeds & Carriage returns

Hi namliam,
I don't know whether I've got the point, so you produce a file in a unix-like OS. After you send it via FTP in windows server to import it to Access. So you can use the ASCII option during FTP the file it will be sent to the server Windows with Line Feed and Carriage Return. Anyway if you have already the file and you don't have a unix-like OS then(I know that it is so stupid to tell it) open the file with a an advanced text editor(like TextPad or UltraEdit) and save it as a Dos file.

bye bye,
ducasio
Reply With Quote
  #3 (permalink)  
Old 12-09-04, 11:23
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool

You could also install cygwin and use the unix2dos utility.
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
  #4 (permalink)  
Old 12-13-04, 04:14
namliam namliam is offline
Registered User
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 421
Thanx for the suggestions....I am affraid that installing something/anything is not an option, my hands are tied on that end....

Changing the method of sending is the same, out of my hands and/or are not willing to change....

The process should be as automated as possible, we need to process multiple files ... Doing it by hand really is not an option either....

Sorry to be so limited, but thats what i have to deal with and get some work done as well.
Easiest would be for the sending party to do a sed command... but my grandchildren will be dead before they listen to me....

Thanx again for all suggestions... Also keep them comming cuase i am still stuck to doing it char by char...

Regards

The Mailman
Reply With Quote
  #5 (permalink)  
Old 12-13-04, 04:42
Damian Ibbotson Damian Ibbotson is offline
Padawan
 
Join Date: Jun 2002
Location: UK
Posts: 525
Do you have flip?
Reply With Quote
  #6 (permalink)  
Old 12-13-04, 11:49
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool

Quote:
Originally Posted by namliam
Thanx for the suggestions....I am affraid that installing something/anything is not an option, my hands are tied on that end....

Changing the method of sending is the same, out of my hands and/or are not willing to change....

The process should be as automated as possible, we need to process multiple files ... Doing it by hand really is not an option either....

Sorry to be so limited, but thats what i have to deal with and get some work done as well.
Easiest would be for the sending party to do a sed command... but my grandchildren will be dead before they listen to me....

Thanx again for all suggestions... Also keep them comming cuase i am still stuck to doing it char by char...

Regards

The Mailman
If you cannot install or change anything, then you have NO options!
cygwin is free and the unix2dos utility can be run in batch.
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On