Q: dBASEIII+ with Delphi.
Quote:
>I have a DOS-based database system that uses
>dBASEIII+ tables.
>I am now using Delphi to create forms that
>display information about the tables.
>However, Delphi is not happy with the existing
>.NDX indexes. How should I proceed?
>Can I convert a dBASEIII+ file to dBASEIV within
>Delphi or do I need to use the database desktop?
>My main problem (I think) is that the current system
>is not going to be updated in the forseeable future,
>but the forms I am creating will probably be used
>frequently so that the III+ to IV conversion will
>have to be done on a regular basis.
>Any suggestions?
>--
>Danny Sofer
Hello Danny!
My problem was similar to Yours but I had to convert clipper files
to dBaseIV.
1) I created a new file in the desktop utility and set some indexes.
2) I created a form i Delphi with just one button
I placed two TTable-object on the form (One for input and one
for output and linked the input/output files in the Obj.Inspect.)
I wrote code for the click-event i.e. (Just my proposal)
procedure TForm1.Button1Click(Sender: TObject);
var j:integer;
begin
Table1.Open;
Table2.Open;
Table1.First;
while not Table1.EOF do
begin
Table2.Append;
for j := 0 to 99 do
begin
table2.Fields[j] := Table1.Fields[j];
end;
Table1.Next;
end;
Table1.Close;
Table2.Close;
end;
Sorry, but I had to set the numbers of fields manually ( = 99!!) for every
file I wanted to convert.
Perhaps is my suggestion not applicable for use for a "regular basis"
anyway I'd be happy if this issue could bring Your closer to a solution.
Guess there are more elegant methodes!
Anyway, Delhpi has made me (old Cobol-freak!!) a lot happier and
furthermore, my customers are happy.
-------------------------------------------------------------------
Kurt Anneborg, Link?ping, Sweden.
-------------------------------------------------------------------