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;
long SQLCODE;
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;
xstrcpy(uname,sizeof(uname),username);
xstrcpy(upass,sizeof(upass),password);
xstrcpy(dname,sizeof(dname),dbname);
/* 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
To: ib-support@yahoogroups.com
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?

Regards
Paul Beach
Main Tel (UK):+44 (0) 1844 354465
Mobile: (UK): +44 (0) 7764 188603
http://www.ibphoenix.com
For all your upto date Firebird and
InterBase information



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Send FREE Holiday eCards from Yahoo! Greetings.
http://us.click.yahoo.com/IgTaHA/ZQdDAA/ySSFAA/dpFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/






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