Subject RE: [firebird-support] C API - isc_attach
Author Dan Crea

From you code example, it looks like you may need to specify a full path to
the database file. Not specifying a path will use the working directory.
So running this binary elsewhere will not find the file. (I'm not 100% sure
on the working directory point...)

isc_attach_database(status, 0, "localhost/usr/local/firebird/kerio.fdb",
&db, 0, 0);
isc_attach_database(status, 0, "/usr/local/firebird/kerio.fdb", &db, 0, 0);

However, if the db file is not found you should get an error in the
ISC_STATUS vector. You should copy this vector and pass the copy to
isc_interprete(...) to see what the error is. Assuming (vector[0] == 1 &&
vector[1] > 0) is true.


-----Original Message-----
From: Roman Jokl [mailto:rjokl@...]
Sent: Friday, June 27, 2003 3:10 AM
Subject: [firebird-support] C API - isc_attach


I have problem with isc_attach_database() function in C API, Debian
linux, FB version 1.5. This code:

#include "ibase.h"

int main (int argc, char *argv[])
isc_db_handle db = NULL; /* database handle */
ISC_STATUS_ARRAY status; /* status vector */

printf("attaching db...\n");
isc_attach_database (status, 0, "kerio.fdb", &db, 0, NULL);
printf("db attached\n");
if (status[0] == 1 && status[1]) {
isc_print_status (status);
return 1;
compiled as :
gcc -lfbembed -ldl -lcrypt -lstdc++ fill_t_p.c -o fill_t_p

works ok in /usr/local/firebird/examples directory. Elsewhere the
function terminate program without any error message.


Yahoo! Groups Sponsor


o?YH=3313099&yhad=1595055> Click Here!


To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<> .

[Non-text portions of this message have been removed]