Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I agree. FOXPLUS or FOX2X are the most likely formats for DOS based dBase systems.I am not sure, but I think the command COPY TO with either the FOXPLUS or FOX2X setting for TYPE.
#define DosChars "„”Ž™šáø"
#define WinChars "äöüÄÖÜß°"
I have a client with proprietary software that requires dBase 5 files. I need to export a file in DBF format that is compatible with their system. I don't know what's different about the files but they have to be dBase 5 format.
MESSAGEBOX(CAST(LEFT(FILETOSTR(GETFILE("dbf")), 1) AS W))
0x02 FoxBASE / dBase II 0x03 FoxBASE+ / FoxPro /dBase III PLUS / dBase IV, no memo 0x30 Visual FoxPro 0x31 Visual FoxPro, autoincrement enabled 0x32 Visual FoxPro, Varchar, Varbinary, or Blob-enabled 0x43 dBASE IV SQL table files, no memo 0x63 dBASE IV SQL system files, no memo 0x83 FoxBASE+/dBASE III PLUS, with memo 0x8B dBASE IV with memo 0xCB dBASE IV SQL table files, with memo 0xF5 FoxPro 2.x (or earlier) with memo 0xFB FoxBASE (?) |
Set Tablevalidate To 0
USE dbVcopy
ZAP
BROWSE
This is the result. I must produce this filetype for the software on their machine.
View attachment 297
CREATE CURSOR tmp (pk N(5), abc c(10))
INSERT INTO tmp VALUES (1, 'www')
INSERT INTO tmp VALUES (2, 'xyz')
COPY TO test-foxplus.dbf TYPE FOXPLUS
COPY TO test-fox2.dbf TYPE FOX2
MESSAGEBOX(CAST(LEFT(FILETOSTR(GETFILE("dbf")), 1) AS W))
CREATE CURSOR tmpm (pk N(5), abc c(10), xtra memo)
INSERT INTO tmpm VALUES (1, 'www', 'something to remember')
INSERT INTO tmpm VALUES (2, 'xyz', 'something to forget')
COPY TO d:\desenvolvimento\temp\teste-m-foxplus.dbf TYPE FOXPLUS
COPY TO d:\desenvolvimento\temp\teste-m-fox2.dbf TYPE FOX2
MESSAGEBOX(CAST(LEFT(FILETOSTR(GETFILE("dbf")), 1) AS W))
I tried 2x and FOXPLUS and neither worked.
And there you go. All I had to do is copy it out without memo fields and use type FOXPLUS and it worked great. Thank you Chris and thank all the rest for all the help.On the other hand: That so many file type byte values have several options means it's no clear sign about the DBF structure, the 0x03 can also simply mean VFP dbf (of some old VFP version, surely) without memo, as FoxPro is also listed for 0x03.
Anyway, after making a file copy and ranaming that to say dbVcopy.dbf does this open and empty the DBF?
If you get there the next thing to try would be INSERT SQL vs APPEND BLANK and REPLACE vs APPEND FROM some other DBF, even VFP9 DBF vs IMPORT or APPEND from a text file.Code:Set Tablevalidate To 0 USE dbVcopy ZAP BROWSE
The irony of the last thing would be that any text file (CSV, tab delimited or SDF format) would be sufficient instead of the dbaseV file, too, Well, wait and see.
The only info I could get about dBase 5 files was they were used by spinoffs like "Clipper" and others. Access "DBF" files are also in this configuration.Okay, so memo fields are what broke it. Well, it's even true for the "modern" VFP DBF formats that files with memo have another file type value than without. AS you can see from the list it even differs whether an autoinc field exists or not.
I learned from this that dBASE V files seem to still be the same as dBASE IV and dBASE III Plus and FoxBase Plus. The formats with memo are 0x83 or 0xF5. They are not really different formats, you wouldn't also say VFP9 DBFs with formats 0x30, 0x31, or 0x32 are different formats, they just have different features and I guess the bit that's telling VFP there is a seprate file for the memo type fields file makes it look for that FPT file or not. Or DBT in case of dBASE.
Well, dBASE V is not explicitly mentioned and maybe (likely) in that dBASE version table with memo have other file types and so headers of such DBFs are incompatible to what VFP knows about DBFs. Unlucky to fail on that detail, of course, but at least VFP creates a DBT file with the TO FOXPLUS option instead of FPT, it doesn't fail on that detail. Maybe it's even just their ACCESS that fails on that and dBASE iself would work with such dbfs with a dbt memo file.