Subject | RE: [firebird-support] Create Database Process |
---|---|
Author | Myles Wakeham |
Post date | 2005-01-28T04:21:22Z |
> On 27-Jan-2005 21:10:17, Helen Borrie wrote:you
> Yes. It is associated with the default transaction...what I can't tell
> for certain is exactly what the configuration of the DPB is when youOur C++ developer would be better to answer that question, but here is the
> 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?
command that we use to connect to the database (from the manual we are
finishing up for this):
fb_attach_database
Description
Connects to an existing database.
Syntax
longint fb_attach_database([out] Array(longint) aStatusVector, [in] string
strDBName, [out] longint hDatabase, [in] string strUsername, [in] string
strPassword)
Parameters
aStatusVector
Error Status Vector. Use fb_interprete to obtain relevant FB error message.
strDBName
Database name.
hDatabase
Database handle.
strUsername
User name.
strPassword
Password.
Return Values
fb_attach_database returns the second element of the status vector. Zero
indicates success. A nonzero value indicates an error. Use fb_sql_interprete
to obtain relevant SQL error message.
Remarks
The fb_attach_database function connects to an existing database to enable
subsequent program access. It also optionally specifies various operational
characteristics, such as a user name and password combination for access to
a database on a remote server.
If successful, fb_attach_database assigns a unique ID to hDatabase.
Subsequent API calls use this handle to identify the database against which
they operate.
See Also
fb_detach_database
Regards,
Myles
===============================
Myles Wakeham
Director of Engineering
Tech Solutions US, Inc.
(480) 451-7440
www.techsol.org