Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Jan 19, 2000

Avoid Line Input Null Problems

Sometimes you have to move information from a flat file (mainframe or ASCII text file) to a database. Usually, this flat file is a set of records, and the delimiter between records is a carriage return/linefeed pair. Records might be different sizes and can contain Null characters. This code is a standard way to read a file line by line, but fails because strBuff loses Null characters, and the structure of the current record is incorrect:
 
Do Until EOF(1)
	'//-------After the next statement strBuff 
	'will be without Null characters
	Line Input #1, strBuff
Loop
I know at least three ways to fix this problem. Here
Vladimir Olifer
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date