Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import a binary file into VFP.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00019096
Message ID:
00019141
Views:
44
>>> I need to import data from a binary file (*.PDB)
>>> into a VFP DBF. FOPEN() returns a -1 which is
>>> an error so I cannot do it this way. Any ideas?
>>
>>FOPEN has never seen a file it doesn't like. <g>
>>
>>I've been able to open every file you can imagine
>>with FOPEN. Perhaps you really have a small
>>syntax type problem. What is the exact line of
>>code that gives returns a -1 to you?
>>
>>==Carl
>
>Hi Carl,
>
>I've never run into a problem with FOPEN either
>until now. I have a file called phone1.pdb on
>a diskette. I used lnFile = FOPEN("A:\PHONE1.PDB",10)
>and also tried lnFile = FOPEN("A:\PHONE1.PDB")
>
>Both gave a -1 lnFile value which is an error. That's
>why I posted the message. In VFP 5.0's help under
>"binary", it says that a binary file can only be read
>by the application that created it.
>
>Thanks,
>Steve Despres
>sdespres@erols.com

Would it also not make a difference if the file in question is using EBCIDIC (is that the correct spelling of this acronym?) character format instead of ASCII based data? I have seen files downloaded from mainframe onto "Magnetic Tape" cassettes and then "restored" onto Novell and Winnt network drives using this data content and have not been able to read them using conventional approaches. There is an IBM conversion utility to convert such data if that is the case with your .pdb files. In my case, I have then been able to import using "append from SDF" approach. /psb.
Patricia S. Brooks
Management Information Systems Solutions.
"Profitable Answers To Business Growth Questions"
5820 Stoneridge Mall Rd. Suite 100
Pleasanton, California 94588-3275
Tel: (510) 355-1381 Fax: (510) 806-9795
msbrooks@missi.com
Previous
Reply
Map
View

Click here to load this message in the networking platform