Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not a Dbase Database error message 11

Status
Not open for further replies.

Mlima

Programmer
Jan 3, 2001
15
BR
Hi:

I have a daily procedure I always execute. I use Excel 2000 (9.0.2812) to convert a txt file (pipe flatfile) to .dbf Dbase III file, to enter to another process.

Strangely, today, when I called, in MSDOS, the dbase command, and tried to USE that .dbf file generated with Excel, it said: Not a Dbase Database. And I couldn't use it.

The most strangely: I still have one previous .txt file, converted yesterday without problems, and I can open its related .dbf file. So, I tried to reconvert that previous .txt file with Excel, it does, but when opening it with the dbase command, I had the same error message.

Can anyone guess what is happening? I thank a lot in advance.

Mario Lima./
 
Mario LIma, I am having the same exact problem. I am assuming that is has to do with 2001 date. We have tried the century on command and this is still not working. Please email me if you get an answer. My file has to go out this afternoon at 4:15. And my Dbase programs wont use my DBF files. ?????????

Sincerely,

denise@mackenzie.com
 
Dear Mlima & Denise - Sorry it took a while for you to get an answer, but it is the Christmas hangover period. The problem is date related! If you can reset the date to something like 03/01/1999 and perform your export, the resulting file will open in dBASE. I’ve tested this a few times and am confident this will work for you. However, resetting the date can be a problem on some networks, and in some cases I’ve come across, I’ve been told that it was impossible. I’ll keep thinking this one through. Perhaps you could tranfer the files to a non-network machine where you have the authority to change the date setting.
Hope this helps for now :)
 
We found that dbase III does not handle anything past 12/31/2000. The file header has an incorrect character. You can use a hex editor to fix that problem. I did find, however, that Clipper programs will handle the databases.

A way to fix the problem with an existing database is to use Clipper to copy the database to another filename. Delete the current database. Copy the filename back to the originally named database. The original database will now work. Clean up by deleting the temporary filename.

I am aware of a proprietary software fix, but I have to see if I can get permission to release it to the public. We didn't design it, and it is not in the public domain.

Hope this helps a little...

Bryant
 
BryantH is right on. Having done some digging, hope you all don’t mind if I show off. The header of a database file holds the essential data on file setup, no. of records, etc and the last date of update which is stored as bytes 1-3 of the header - for example
03640103 67010000 81028400
(It’s always as YYMMDD regardless of dBASE settings.) The value above translates to 3rd January 1999 (64=1999). This date value is inserted by dBASE on file creation, or on significant updates and by those applications, which export files for dBASE use. When 2001 came along, Excel logically started to insert a value of 65 for 2001 as in
03650103 67010000 81028400
Of course there’s no such value in hex and a hexadecimal application will give up suspecting the file is corrupt. As BryantH suggests, using a hex editor is one answer – just change the 65 to 63 and the file is usable.
Another alternative is to create a temporary, empty database with the structure you want to use for your .DBF file – name it shell.dbf say. Then, from Excel, export your file (pipe flatfile?) as one of the formats given below. Then use the appropriate command listed alongside to import the data into shell.dbf. Copy the now full shell.dbf to the name you want to use. Zap the records in shell.dbf so its ready for future use, open your newly created .DBF file and work away.
I’ve tested this export system and it works, probably as these exports don’t use the date. By the way, the resultant .DBF file will return something like 1901 if you do a ? lupdate() – but this has been the case for a year or so anyhow!
Format Import command

CSV comma delimited append from <filename &amp; ext> delimited with ,
WKS (1-2-3) append from <filename &amp; ext > wks
Formatted Text (Space Delimited) append from <filename &amp; ext > delimited with blank

Hope this helps
GEMS :)
 
I tried, but I cannot release the fix, that I mentioned earlier, to the public. It was released to customers that are paying for customer support for the software product that we are using to export to the dbase file.

Essentially, it is an executable that looks at the headers of all of our dbaseIII files in a certain folder and &quot;fixes&quot; the headers. It takes about 4 seconds to fix about 50 files.

Hopefully, a clever programmer can provide a similar (public) piece of software.

Bryant
 
We also came across the problem as described above
and got the message : Not a Dbase Database
This happened after using a TOPAZ-program on the database.
After trial and error, I could restore the database
simply using the structure of the original database and
with the command 'append' extracting the records from the
'crooked'-database (yes, it is still possible to use the
damaged database; also by dBase-instructions or for
instance by SPSS and other programmes)
My problem however, is that we repeatedly change the
database with TOPAZ-programmes and we do not want to
changes every database the resulting databases.
Do you think there is a other solution to this problem?

greetings, Jan Poppelaars, VU, Amsterdam

 
Thank you all for your help. We have tried using the hex program which does work and that is pretty cool. The only problem is our files (dbf) change everyday (20 of them) and we would have to open the files change and save each one in the hex program every time we used the files.
I seriously think we are looking into using New Software. We are currently considering Access. Hopefully our program files will import or open into Access with no problems ??
 
Has anyone considered using the new DBase products? I have ordered the DBase 2001 product (or whatever it is called). They have a website advertising it. I believe that it is shipping now. At least you would be able to stick with DBase type files and commands, if you want to.

Bryant
 
Glad to hear that the hex editor solution is working. But have you tried the exporting methods I posted earlier? These export options should be available to you in Excel's “Save as type“ scroll box. If they are not there, were they omitted on installation to save space? Maybe you could get them installed. If you could get any one of those export options to work, a handful of commands could be written into an application to make the conversion process automatic. Just ask and I’ll gladly furnish a skeleton application for you to amend and finalise.
And now to - Oooops! I guess it serves the grey haired old fool right for showing off but I made a real stinker of an error in my last reply. No harm was done to anyone – I always try to guard against that – but boy is my face red?
Of course there is a value of 65 in hexadecimal, it’s 101 in decimal. What I should have said was that dBASE won’t tolerate a hexadecimal value of 65 or more in byte three of a dBASE database file header.
GESMs:)
PS -Sorry I'm late with this -
Hope you all had a good Xmas and are having a brilliant new year.
(Time to shoot the old fool!)
 
Hi, GEMS and everyone:

Thanks a lot, you all were so kind in helping with this problem, you were great!

Mario./
 
I know exactly why...dBase III Plus has a problem with the year 2001!!! In the dBase file structure, the 2nd byte is the year portion of the 3-byte YYMMDD triad. dBase files updated in 2001 have a 65 Hex in that position. 65 Hex is 101 decimal. The problem shows up in DOS dBase III only.

I verified this by changing the date to 12/30/2000 and running a program of mine that uses dBase files. I performed a function that caused the date to be updated (thus 2000) and when i exited to DOS and ran dBase III it worked!!!

If you or anyone knows of a TRULY YTK compatible version of dBase III Plus give me a holler at my eMail address.
Jerry Scannell
JScannell1@Home
 
I've been using dbase 4 since the crash. it's still dos based &amp; very similar to III.
If anyone is switching over to visual dbase I'd be interested in hearing
how it goes. we may try access but i'd like other opinions.
 
I use Visual Basic 4.0 as a front end for my dbase III plus file. After editing the file, I received the not a dbase database error message when attempting to print reports.
 
I have a solution. I wrote a program FIXDBASE.EXE that temporarilly changes the date to 12/30/2000, opens and closes a data base, and restores the date. All you have to do is run the program like: fixdbase <file name> e.g. fixdbase invoices.dbf

How do I provide files to this forum? I can't find a way to attach to this.

Jerry Scannell
JScannell1@Home
 
Hi, Jerry, Your program seems to be very practical. I don't know if this forum accepts attachments. Anyway, if you could kindly send it to me:

mariolima@multisites.com.br

Thanks a lot.

Mario./
 
To JScannell,

If you still have the source code. You could post the entire code in A NEW POST and use a LIGHT BULB for the posting, instead of a question mark. Just indicate what compiler is necessary.

If the EXE is a pripority program, don't post it nor it's code (source/compiled/or otherwise) due to legalities. Unless, the program states &quot;freeware&quot; or &quot;free to distribute&quot; (you know...something like that) -or- you have permission from the owner(s) to do so (perferrably in writing).

--MiggyD
 
GEMS
Well done Jerry - I like your .exe solution and it it gets a vote from me! I was behind you in writing a fix (well behind it seems!) as I got really stuck with the command to call an application which would open, close the database and time stamp its third byte? What did you use? I stand in awe!
GEMS :)
 
I have a C library of dBase routines called CodeBase. It was produced by Sequitter Software of Vancouver, Canada. I have had the stuff for nearly 10 years. I do a ton of DOS-based programming using dBase files. (I am of the old school and fought the changes to gui-based complicated development).

Anyway, All I do is open the file you pass at the command line, append a blank record, delete the blank record, and pack the file. This activity causes the date bytes to be changed when you close the file.

Jerry Scannell
JScannell1@Home
 
Oooo, I love it, JScannell. Simplistic AND functional.

I guess the closest to that .H module would be something like:

set echo off
set talk off
MyBase = &quot; &quot;
clear
@ 1, 1 say &quot;enter database to use (inc. path):&quot; get MyBase
use &amp;MyBase
goto bott
append blank
goto bott
dele recno()
pack
clear
@ 1,1 say &quot;all done...please check and confirm update&quot;
set talk on
set echo on
return/exit/quit *(which every you choose)

Obviously, there may be some errors in the above. It was straight-typed (not tested) but most of the essentials are there. And of course there is always room for improvements.

Good job, JScannell.
--MiggyD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top