Subject | Re: How do I turn off or supplied user/password for embedded database access? |
---|---|
Author | lec_sas |
Post date | 2006-05-12T19:51:22Z |
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.
Example:
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++;
Thanks
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
I am programming with ansi-C in Visual Studio 2005. For some reason
attach_database doesn't like the DPB I send it.
Example:
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++;
Thanks
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
>call
> > ok, I am using the embedded dll, and the isc_attach_database api
> > does not allow for user/password specification.API.
>
> 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
>