Subject Re: isc_interprete/fb_interprete...A Stupid Question...
Author Iman S. H. Suyoto
--- In firebird-support@yahoogroups.com, "federonline"
<federonline@...> wrote:
> I'm debugging with valgrind and got a warning that isc_interprete is
> depricated. In looking through the header file, I see that
> fb_interprete is there with an added argument. Is the difference
> documented in the FB Book or somewhere else?

The second parameter specifies the length of the buffer supplied in
the first parameter:

http://tech.groups.yahoo.com/group/firebird-support/message/81285

> Also, is there a better way to set USER/PASS than isc_expand_dpb
> (since it is also depricated)?

Here's an example in C (sorry, I'm not really good in C++, so I don't
know whether this is idiomatic in C++. But I hope you get the idea).

===
char dpb_buffer[SHRT_MAX + 1] = {0};
char *dpb = dpb_buffer;
char *username = "username";
char *password = "password";
char username_len = strlen(username);
char password_len = strlen(password);

*dpb++ = isc_dpb_version1;

/* Set number of cache buffers */
*dpb++ = isc_dpb_num_buffers;
*dpb++ = 1;
*dpb++ = CHAR_MAX;

/* Set SQL dialect */
*dpb++ = isc_dpb_sql_dialect;
*dpb++ = 1;
*dpb++ = SQL_DIALECT_CURRENT;

/* Set username */
*dpb++ = isc_dpb_user_name;
*dpb++ = username_len;
strcpy(dpb, username);
dpb += username_len;

/* Set password */
*dpb++ = isc_dpb_password;
*dpb++ = password_len;
strcpy(dpb, password);
dpb += password_len;
===

HTH.