At 04:26 PM 26/09/2007, you wrote:
>thank you for your reply!
> > in VisualFoxPro you can use SqlStringConnect
>Well, I will check if I can use this method also for
>gdb files. I gave Foxpro only as an example because
>its ODBC driver offers the option to connect to a
>database file or to connect to all files of a folder,
>so pls. let me ask again:
>Is there an ODBC driver for Firebird databases that
>consist of many gdb-files in one directory?
There is no such thing as a Firebird database that consists of many
separate gdb (or fdb or anything else) files.
Note that a Firebird database can be logically split across multiple
files in the filesystem but this splitting is logical only, a legacy
from times past when filesystems had low limits on the size of file
that could be accessed. It was a way to have databases of great size
on FAT32 partitions, for example. However, the entire Firebird
database lives inside a single logical set of one or more physical
files. No specific file in the set can be addressed except via the
file name of the primary file (the first of the set).
>Can I have all gdb-files of a directory in one ODBC
No. An ODBC data source interfaces one Firebird database with your
>or do I have to connect to the single files
Forget "files". Firebird is not a "file-served" data management
system like Foxpro and Access, so there is absolutely no correlation
between "tables" and "files" in Firebird. The Firebird server
manages the storage space for each database discretely and totally
independent of any other database.
Firebird supports multi-database transactions. Is, if the driver
supports it, your application should be able to connect to two (or
more) Firebird databases, each configured as a distinct data source,
querying data from one and writing data to another, all inside the
same transaction, which your application can commit or roll back
using two-phase commit. (Two-phase commit ensures that commit or
rollback will be propagated to all databases in the transaction or to
none of them.)
But Firebird databases can't connect to other databases, and no
driver can make Firebird do what it cannot do.
I'm not an ODBC or ADO user at all but hopefully someone here, or the
documentation for the driver, will tell you whether multi-database
transactions are supported. However, I'm not sure that it is what
you are asking for...
You say you have multiple "projects" each with its own database. If
"project" means "application" and your intention is for different
applications to share the same data, then all of the data should be
in one database that is accessed by all of the different
applications. So, for example, if you have an order-taking
application and an inventory application, then you will have product
definitions, stock data and customer data in a single database that
each of the applications uses for its own purposes.