Board index » delphi » How to set database file location

How to set database file location

How do I specify where the database file is located? Does it always end
up in some standard location, or do I set it somewhere?
 

Re:How to set database file location


On Thu, 18 Mar 1999 21:48:52 +0100, Svante Granqvist

Quote
<svante.granqv...@altavista.net> wrote:
>How do I specify where the database file is located? Does it always end
>up in some standard location, or do I set it somewhere?

It depends on whether you are accessing the database through an ODBC
driver. Accessed through any means but this, and the database location is
specified either in the Params property of a TDatabase component or the
DatabaseName property of an individual dataset component (like TTable or
TQuery). ODBC drivers have the database location in their DSN definition,
accessed through the ODBC manager.

For the native (non-ODBC) type access, how you express a database's
location varies depending on whether you are using a local (Paradox or
dBASE) or an SQL database. For local databases, put the drive and directory
reference that is the "database" in a PATH parameter in the
TDatabase.Params property, directly in the DatabaseName property of dataset
components, or in the definition of a BDE alias (used in the dataset
DatabaseName property or the TDatabase.AliasName property). For SQL
databases, the TDatabase.Params parameter is SERVER NAME, and includes a
server and database reference.

//////////////////////////////////////////////////////////////////////////
Steve Koterski                 "Like a camel, I can go without a drink for
Technical Publications         seven days--and have on several horrible
INPRISE Corporation            occasions."
http://www.borland.com/delphi                                 -- Herb Caen

Other Threads