Link to home
Start Free TrialLog in
Avatar of xuxuf
xuxuf

asked on

How to access Interbase db under linux using c/c++?

I have to write a application to access Interbase db using c/c++ under linux.But I don't know how to do it and what I need .Who can help me ?
Avatar of xuxuf
xuxuf

ASKER

I use the Interbase API to access the DB (Interbase 7.1 on linux 7.2):
 dpb = dpb_buffer;
   *dpb++ = isc_dpb_version1;
   *dpb++ = isc_dpb_num_buffers;
   *dpb++ = 1;
   *dpb++ = 90;
   dpb_length = dpb - dpb_buffer;
   strcpy(uname,"SYSDBA");
   strcpy(upass,"masterkey");
   isc_expand_dpb(&dpb, &dpb_length,
      isc_dpb_user_name, uname,
      isc_dpb_password, upass,
   NULL);

   strcpy(empdb,"BillingServer:/tmp/test2.gdb");
   db_len=strlen(empdb);

   if(isc_attach_database(status,db_len,empdb,&db,dpb_length,dpb_buffer))
   {
       ERREXIT(status,1)
   }

I encountered the error is :
'connection rejected.'
Who can help me?
This can make your life easier:

IBPP, A C++ client interface for Firebird Server & InterBase
http://www.ibpp.org/


Bojidar Alexandrov
ASKER CERTIFIED SOLUTION
Avatar of Stummel
Stummel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial