Board index » delphi » TDatabase/TQuery {*word*89} on FoxPro

TDatabase/TQuery {*word*89} on FoxPro

I'm trying to access two FoxPro files among many in a directory on the
network.  A TDatabase/TQuery combo keeps giving a Unknown Database error
when the DatabaseName is set to the directory path.

Is there anyplace that documents how to get BDE components (or ADO
components for that matter) to work with a directory of FoxPro files.
--
Please respond only in the newsgroup.  I will not respond
to newsgroup messages by e-mail.

 

Re:TDatabase/TQuery {*word*89} on FoxPro


On Thu, 16 Mar 2000 10:50:54 -0600, "Mark Reichert"

Quote
<m...@messagelink.com> wrote:
>I'm trying to access two FoxPro files among many in a directory on the
>network.  A TDatabase/TQuery combo keeps giving a Unknown Database error
>when the DatabaseName is set to the directory path.

The DatabaseName property of which of those two components? The
TDatabase or the TQuery?

When dealing with local database types (Paradox, dBASE, FoxPro),
specify the path to the directory that represents the "database" in
the Params property of the TDatabase. Set the DatabaseName property of
both the TDatabase and the TQuery to a string that is not the
directory or the name of a BDE alias. For example:

  with Database1 do begin
    Close;
    DriverName := 'STANDARD';
    DatabaseName := 'AppDb';
    LoginPrompt := False;
    Params.Clear;
    Params.Add('k:\usrs\TheApp\TheData\'
    Connected := True;
  end;
  with Query1 do begin
    Close;
    ...
    DatabaseName := Database1.DatabaseName;
    Open;
  end;

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
Steve Koterski                    "If you aren't fired with
Technical Publications            enthusiasm, you will be
Borland                           fired with enthusiasm."
                              -- Vince Lombardi (1913-1970)

Re:TDatabase/TQuery {*word*89} on FoxPro


Quote
Steve Koterski <koter...@gte.net> wrote in message

news:38d51dc5.9965578@forums.borland.com...

Quote
> The DatabaseName property of which of those two components? The
> TDatabase or the TQuery?

> When dealing with local database types (Paradox, dBASE, FoxPro),
> specify the path to the directory that represents the "database" in
> the Params property of the TDatabase. Set the DatabaseName property of
> both the TDatabase and the TQuery to a string that is not the
> directory or the name of a BDE alias. For example:

Thanks, I actually managed to stumble onto that on my own, except I used the
Editor available when right-clicking the TDatabase component.  Also finally
figured out that the STANDARD driver handled FoxPro files.
--
Please respond only in the newsgroup.  I will not respond
to newsgroup messages by e-mail.

Other Threads