Subject | Re: API vs ISQL problems |
---|---|
Author | edcurren |
Post date | 2005-05-27T19:38:30Z |
Hi Dimitry,
Thanks for taking the time to reply. I appreciate your guidance.
reading the API 6.0 guide to get myself up to speed on things, and
that documentation uses isc_expand_dpb.
know it can't do it :)
Thanks for your help.
more than a few things wrong with what I posted.
--- In firebird-support@yahoogroups.com, "Dimitry Sibiryakov"
<SD@t...> wrote:
Thanks for taking the time to reply. I appreciate your guidance.
> > dpb = dpb_buffer;Okay, where can I find lists of depricated functions? I've been
> > /* Add user name and password to DPB. */
> > isc_expand_dpb(&dpb, &dpb_length, isc_dpb_user_name,
> >m_AdminDbUser, isc_dpb_password, m_AdminDbPass, NULL);
>
> At first, isc_expand_dpb is deprecated (read - forbidden) to use.
reading the API 6.0 guide to get myself up to speed on things, and
that documentation uses isc_expand_dpb.
> >When I run the same INSERT statement against the same database inISQL
> >it works without any errors at all.You will have to come and tell my computer that. It still doesn't
>
> Sorry, but I can't believe it.
know it can't do it :)
Thanks for your help.
> > if( isc_dsql_execute_immediate(status, &hDb, &hTx, 0, stmt,Yes, I had been mucking around with the code. There were probably
> >3, NULL) )
>
> Note dialect 3 here. Do you still don't understand what is wrong?
> Read more about quoted identifiers in dialect 3.
more than a few things wrong with what I posted.
--- In firebird-support@yahoogroups.com, "Dimitry Sibiryakov"
<SD@t...> wrote:
> On 26 May 2005 at 19:27, edcurren wrote:ISQL
>
> > dpb = dpb_buffer;
> > /* Add user name and password to DPB. */
> > isc_expand_dpb(&dpb, &dpb_length, isc_dpb_user_name,
> >m_AdminDbUser, isc_dpb_password, m_AdminDbPass, NULL);
>
> At first, isc_expand_dpb is deprecated (read - forbidden) to use.
>
> > char *stmt = new char[1024];
> > strcpy(stmt, "INSERT INTO Users (UserName, UserPassword)
> >VALUES ('");
>
> Note double quote here.
>
> > if( isc_dsql_execute_immediate(status, &hDb, &hTx, 0, stmt,
> >3, NULL) )
>
> Note dialect 3 here. Do you still don't understand what is wrong?
> Read more about quoted identifiers in dialect 3.
>
> >When I execute it I receive the following:
> >Dynamic SQL Error
> >SQL Error code = -204
> >Table unknown
> >USERS
>
> Are you sure that your table was defined as Users and not "Users"?
>
> >When I run the same INSERT statement against the same database in
> >it works without any errors at all.
>
> Sorry, but I can't believe it.
>
> >Can someone guide me as to what is wrong here?
>
> Quotes, IMHO.
> --
> SY, Dimitry Sibiryakov.