Here is the corrected program segment. I found the answer in another forum 
posted in 2006. I needed to set the unicodeText to false to read XP txt files.

AddObject("newObjects.utilctls.SFMain"), "input"
AddObject("newObjects.utilctls.SFRecord"), "icmaRec"
Set file = input.OpenFile("\Documents and Settings\AcuTrack\icMaster.txt")
icmaRec.AddField "icmaItemNbr", vbSTRING, 10
icmaRec.AddField "icmaDesc1", vbSTRING, 30
icmaRec.AddField "icmaDesc2", vbSTRING, 30
icmaRec.AddField "icmaRestRec", vbSTRING, 24
icmaRec.AddField "crlf", vbSTRING, 2   '-- didn't expect to need this.
icmaRec.BindTo file
icmaRec.Filter.unicodeText = False '-- required for XP .txt files.
icmaRec.ReBind




--- In nsbasic-ce@yahoogroups.com, "George Henne" <g...@...> wrote:
>
> Is this all printable data?
> 
> In that case, why not simply used ReadText?
> 
> There is no reason to use fields.
> 
> 
> >I have a text file sync'ed over from my laptop to a PDA. The text file
> >has exactly 500 records and each is 90 chars long with a new line
> >terminator. Running this on the PDA my problem is using the code below:
> >
> >AddObject("newObjects.utilctls.SFMain"), "input"
> >AddObject("newObjects.utilctls.SFRecord"), "icMaster"
> >Set file = input.OpenFile("\Documents and Settings\AcuTrack\icMaster.txt")
> >icMaster.AddField "icmaRec", vbSTRING, 90
> >icMaster.BindTo file
> >
> >partsCount = icMaster.RecordCount
> >MsgBox ("fileLoc=" & partsCount)
> >    
> >The partsCount reports 256 records. Not the 500 in the file. I've
> >checked the file on laptop with Crimson Editor and it is truly 500
> >records and each one is 90 chars long. Do you see what I have done
> >wrong? I don't want to expand the fields until I solve this.
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
>


-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.

Reply via email to