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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dbase IV - reindex command

Status
Not open for further replies.

SimonR

IS-IT--Management
May 19, 2001
4
GB
I have inhertied a dbase IV program, on the whole well written with with a couple of bugs, one of which is getting to me !!

The programmer had (sensibly) set up a menu option to reindex the mdx file. But it crashed with "file already open"
I tried running the reindex file from the dot prompt as follows
close all
use <main dbf.
close index
reindex

this either
a) crashes on the first index tag build with &quot;file already open&quot;
or
b) sometimes on the second tag (same message)

I get the same from within the command center

each time it crashes I lose the index it was working on & have to rebuild manually!!

I am getting typers cramp!

how can I get this to work?
any ideas?

Simon
 
I have a not too dissimilar problem using dBase IV, but I don't get file open problems: instead I get index out of date. I would imagine that this is not down to a speed problem that can be solved with IDXFIX.

Does anyone know of a tool that can be run from the command line that will create a new index (MDX) file? DBD does the job, but I cannot have non technical customers use tools like this.

Any help would be greatly appreciated.

Richard
 
I have a customer running a dBase program on an early version of dBase III+ on a Windows 98 machine. All of sudden it quit pulling up records in the data file. The screen display would be empty and they could and would enter a new record in what should have been effectively a unique field. I solved their problem by compiling the program. (Clipper '87 and maybe A-Link). This may only end up buying time. I don't recall getting any other error messages. But maybe this would speed up the processing of the reindex command?
 
I too have had the same problem. I have written many programs with dbase IV's programming language and had no problems with them when running them under DOS.

When I bought my first Pentium 133 back in 1997 I had the problem with &quot;File already open&quot; when reindexing. That computer had win95 and I made á startdisk with DOS and ran my dBaseprogram in that mode and it worked.

Now I have á Pentium 4 1700 MHz and the problem with &quot;File already open&quot; has become permanent. Making á DOS-disk and run in old fashion mode does not help. I even tried to make á DOS- partition on the disk but that also failed.

I simply cannot run my dBase program anymore and that is á very big problem.

I do hope that someone can come up with á solution of this ridiculous problem
 
ANV:

Have you considered a sort of &quot;forced&quot; write/update commitence through your PRGs?

If I'm not clear enough, post again.

--MiggyD It's better to have two heads to solve a problem from different angles than to have tunnel vision to a dead end.
 
This is my first crack at this and my experience level is that I fly from the seat of my pants.

I also have the reindex problem. I have my own copy of db4 which I installed on my new X20 Thinkpad System complete with a replicator. Everything seemed to worked until I tried indexing my .dbf files and got the &quot;file already open&quot; message. I noticed that [Esc/Lock] was on the bottom tool bar. I have no idea how this came about. Is that significant?

bignorm.
 
I do not know myu iommediate solution was and has been to use sort instead of index through this does not allow you to work with opened files but for final and print file i continue to use sort.

May this could help

Boniface
 
See JVALOR's thread &quot;dBASE IV and Windows 2000&quot;.

I, too, tried IDXFIX to no avail. The following is excerpted from JVALOR's thread:
---
Regarding Pat Riley's (Visitor) post of Oct 17, 2001:

>I found a fix for the &quot;File already open&quot; problem in dBase
>IV running on fast processors. It is at:
>>It is build xx71 of dBase IV, ver 1.5.
>You will need the serial number from your original 1.5
>disks to use it.
>I have not installed it so I can't confirm that it works
>but it sounds good.
>Pat Riley Ottawa ON
--
I found this same new build several months ago.

It does improve the situation greatly, but not completely. I still get the &quot;file already open&quot; complaints, but much less. I have been able to work around them. Mind you, I do nearly everything manually. I am not using &quot;applications&quot;.

I find old dBASE IV the best tool I have for some occasional tasks, but the &quot;file already open&quot; problem almost forced me to give up on it. I installed it on my Dell Optiplex GX1 (500 MHz). It dual-boots DOS 6.2 and Windows NT 4. So far, I have always used dBASE under DOS.

And yes, it's a full installation. You DO need a serial # that it will accept. Also, it makes diskettes - and only 720KB (double-sided DOUBLE-density - not &quot;high&quot; density) will work. I tried standard 1.44 MB diskettes. Sorry - doesn't work. They were not standard years ago when this package was made. But... you CAN make them in a standard 1.44MB disk drive.

I had thought the &quot;file already open&quot; problems were due to Windows and/or NetWare 5 interfering with the old dBASE IV mechanisms, since it was only certified up to NetWare 3. I would re-boot into DOS without letting the network drivers even load. That seemed to help for awhile, but I still had so much trouble that I nearly gave up on it.

This new build works pretty well even with our NetWare 5. I no longer bother booting without the network drivers.

I usually get the &quot;file already open&quot; error when pressing F2 DATA on a couple of my mult-file queries. Some queries have trouble often. Simpler ones rarely do. When it persists in happening, I find that bringing up the query in Modify (Shift-F2) and then pressing F2 (DATA) from that screen usually works. One complex query I had to split into two - write the first query view as a file, and base the second query on the file made by the first.

Sometimes I have to try several times before it &quot;gets through&quot;.

It's definitely NOT a &quot;robust&quot; platform, but for some simple tasks I have found it the most useful tool in my collection, and still &quot;worth its salt&quot;.

Erick Starren
San Diego
 
I run dbase4 on a Novell network. The work around is to use dbase5 to sort/reindex, it was released after windows and can handle muti indexes
 
I'm still using dBase IV 1.1. I have experienced the &quot;file already open&quot; error as well, but only on 486 and later machines. I keep 386 machines on the network for the reindexing process. I believe the problem is the hardware caching found in the newer systems.
My workaround for this problem is to
set deleted on
copy to tmp
zap
reindex
-and/or-
index on _____ tag ______
append from tmp

this gets rid of deleted records, and rebuilds indexes.
Works for me.
 
Hi all

Only just started using this forum, but, as with many others above, I have used dbase from dBase II to dBase 5.7.

The problem is to do with clock speed of the computer. Reindexing and ZAPping creates a temporary file that dbase writes to based on the time/clock of the computer. However, quicker machines meant that the temporary file was being given the same name as the source file and it was trying to write to itself.

At the time, I was able to acquire a set of patch disks (vers 1.50. Version 2.0 was shipped without this problem.

I don't know if dbase inc still has the patches, but it may be worth having a go at asking them.

Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top