Subject Newbie - Default User and Password
Author barfingdog2004
Hi Folks:

I'm learning Firebird on Win2K.

While reading through the API guide and other
documents, I've attempted to run the example api1.c.

The "CREATE DATABASE" SQL statement is processed
OK, and the sample calls isc_detach_database(). Then
isc_attach_database() is called and I'm getting this
error:

[
PROBLEM ON "attach database".
Your user name and password are not defined. Ask your database
administrator to
set up a Firebird login.
SQLCODE:-902
]

I've created a sample directory and copied all of
the examples into it.

I ran gsec with SYSDBA's user and password, and
defined a user name. I don't have it in front of me,
but it was something like "add user larryl -pw xxxx".

As instructed in the sample code readme, and the
API guide, I've defined environmental variables for
ISC_USER, ISC_PASSWORD and ISC_DATABASE.

I put these variables in the "user variables for
larryl" group, do they belong in the "system variables"
group?

I modified api1.c to reflect my user name and password
in the "CREATE DATABASE" SQL passed to
isc_dsql_execute_immediate(), but changed nothing else.

The "CREATE DATABASE" statement is processed without
error and the FDB file is created, so I'm thinking the
gsec session worked OK.

Then the sample calls isc_detach_database(). Next
is the call to isc_attach_database(), and the error.

Suggestions?

Thanks
Larry