Subject Re: How do I turn off or supplied user/password for embedded database access?
Author lec_sas
Ivan, where would we define those environment variables?

I am programming with ansi-C in Visual Studio 2005. For some reason
attach_database doesn't like the DPB I send it.


char* user_name = "SYSDBA";
char* user_password = "masterkey";

char dpb_buffer[256], *dpb, *p;
short dpb_length;

dpb = dpb_buffer;
*dpb++ = isc_dpb_version1;
*dpb++ = isc_dpb_user_name;
*dpb++ = strlen(user_name);
for (p = user_name; *p;)
*dpb++ = *p++;

*dpb++ = isc_dpb_password;
*dpb++ = strlen(user_password);

for (p = user_password; *p;)
*dpb++ = *p++;


--- In, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
> > ok, I am using the embedded dll, and the isc_attach_database api
> > does not allow for user/password specification.
> It can be specified using database parameter buffer (DPB),
> i.e. the last parameter of isc_attach_database().
> Or, you can use environment variables ISC_USER and ISC_PASSWORD.
> >
> > Again, pardon my ignorance, I did not find any documentation on
> > I can only derive the calling sequence from the header file.
> Use InterBase6 documentation.
> Ivan