Subject | Database already exist when testing example - api1.c |
---|---|
Author | Yu Ang Tan |
Post date | 2014-11-03T07:13Z |
Hello there,
I am new to Firebird and I am setting up my local server on Xubuntu 12.04 (using firebird2.5-superclassic)
I am currently testing out example api1.c to familiarize with the concepts, but I have encountered a problem.
When I compile and run the example, this is what I get:
First Run
test@test-virtual-machine:~/Projects/Database/firebird_test00$ ./api1
Database already exists.
Remove new.fdb before running this program.
[
PROBLEM ON "create database".
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQLCODE:-902
]
Renaming the database file from "new.fdb" to "new_also2312.fdb" or any other random names didn't make a difference.
test@test-virtual-machine:~/Projects/Database/firebird_test00$ ./api1
Database already exists.
Remove new_also2312.fdb before running this program.
[
PROBLEM ON "create database".
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQLCODE:-902
]
sudo didn't help either.
Second Run
I added by username and password onto the CREATE DATABASE string as follows:
test@test-virtual-machine:~/Projects/Database/firebird_test00$ ./api1
Created database 'new.fdb'.
[
PROBLEM ON "attach database".
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQLCODE:-902
]
Now I can create the database file! Turns out that specifying the user and password solved this problem.
Even so, I find it rather odd that the system claims that the database already exist when clearly there's nothing in the directory.
Is this an expected behaviour? If not, has anyone encountered this issue?
Thanks in advance,
Ang