Subject RE: [firebird-support] Create Database Process
Author Helen Borrie
At 08:23 PM 27/01/2005 -0700, you wrote:

> > On 27-Jan-2005 20:03:50, Helen Borrie wrote:
> > Just send a valid CREATE DATABASE or CREATE SCHEMA statement through the
> > API by whatever means you normally communicate through the API. Follow it
>
> > up with a COMMIT statement and the server will connect to the new database
>
> > and send the database handle back to the waiting application -- exactly as
>
> > it does when isql happens to be the waiting application.
>
>I'm trying to do this from 4th Dimension right now, and I can execute SQL
>for the creation of the database just fine, but does this assume that once
>the database is created, the user is now connected and logged in as the
>User/Password that was specified for the database?

It would if the interface enabled it.


>If so, does this imply that it has the same affect as Connecting to the
>database afterwards, ie. That the user is 'attached' to the database, but no
>transaction has yet been created.

No, if the user is connected to the database then at least one transaction
is running.


>If so, in order to do the COMMIT, how does one execute that? Isn't a COMMIT
>only associated with a transaction?

Yes. It is associated with the default transaction...what I can't tell you
for certain is exactly what the configuration of the DPB is when you
connect to the server in order to do a CREATE DATABASE. I've always
assumed that the server starts gds__trans whenever it hasn't been supplied
with a handle. This might be an optimistic assumption. How does 4th
Dimension actually connect to the server? i.e. what's the data access
interface?

Helen