Q: dBASEIII+ with Delphi. 
Author Message
 Q: dBASEIII+ with Delphi.

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



Mon, 02 Mar 1998 03:00:00 GMT  
 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?

One alternative is to use a TTable descendant that permits dBase III+
indexes.  The component name is D??NDX and should be available from several
ftp sites.

Paul Rice



Mon, 02 Mar 1998 03:00:00 GMT  
 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.


-------------------------------------------------------------------



Thu, 05 Mar 1998 03:00:00 GMT  
 Q: dBASEIII+ with Delphi.

[...]

: 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!

Aside from the fact that you could have just used a TBatchMove component
to do what your example code does (migrate records from one TTable comp-
onent to another), you can programmatically retrieve the number of fields
in a given table. This is done using the TFieldDef object, which contains
an array of field definitions and a count of the fields. For example:

  procedure TForm1.Button1Click(Sender: TObject);
  var
    FieldCount: Integer;
  begin
    with Table1 do begin
      Open;
      FieldCount := FieldDefs.Count;
      ShowMessage('Fields: ' + IntToStr(FieldCount));
      Close;
    end;
  end;

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Steve Koterski               _/   The opinions expressed here are    _/

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



Fri, 06 Mar 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. reading struc-info of a DBaseIII+ database

2. BDE replacement that works with dbaseiii+ .ndx files

3. Newbie: Delphi and dBaseIII Tables - Hairs turning Grey!!!

4. DBaseIII and BDE

5. dBaseIII File Structure and Import Problems

6. qs?.mb files and lost data

7. Database link'n'joining Qs

8. Delphi...Delphi....Delphi - New Delphi Site

9. Delphi, Delphi, and Delphi

10. Delphi:Paradox vs Delphi:SQL Anywhere vs Delphi:FoxPro via Apollo

11. Problems with compiling of DBBrowser demo (Delphi 1.0) in Delphi 2.0 and Delphi 3

12. editer of database on delphi without delphi

 

 
Powered by phpBB® Forum Software