Subject Re: [ib-support] i have a question about API for interbase
Author shyang
code is below....

char dpb_buffer[256], *dpb, *p;
char uname[256], upass[256],dname[256];
short dpb_length;
char msg[512];
/* Set database handle to zero before attaching to a database. */
conn->hdb = NULL;;
conn->htr = NULL;;
conn->sqltype = 0;

dpb = dpb_buffer;
*dpb++ = isc_dpb_version1;
*dpb++ = isc_dpb_user_name;
*dpb++ = strlen(username);
for (p =username; *p ;)
*dpb++ = *p++;
*dpb++ = isc_dpb_password;
*dpb++ = strlen(password);
for (p =password; *p ;)
*dpb++ = *p++;

dpb_length = dpb - dpb_buffer;
/* Add user name and password to DPB. */
dpb = dpb_buffer;
isc_attach_database (conn->status, 0, dbname, &(conn->hdb),dpb_length,dpb);

What is problem????
----- Original Message -----
From: Paul Beach
Sent: Thursday, December 27, 2001 12:38 AM
Subject: Re: [ib-support] i have a question about API for interbase

> I use API for interbase. It is 'isc_attach_database'.
> When I run the code, I meet that error message.
> 'unsuccessful execution caused by an unavailable resource'
> What is problem????

Can't attach to the database, because its not there?

> And How can I do to solve the problem...?????

Code the call correctly?

Paul Beach
Main Tel (UK):+44 (0) 1844 354465
Mobile: (UK): +44 (0) 7764 188603
For all your upto date Firebird and
InterBase information

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Send FREE Holiday eCards from Yahoo! Greetings.

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to

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