Subject | Re: [firebird-support] API vs ISQL problems |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2005-05-27T05:29:07Z |
On 26 May 2005 at 19:27, edcurren wrote:
Read more about quoted identifiers in dialect 3.
--
SY, Dimitry Sibiryakov.
> dpb = dpb_buffer;At first, isc_expand_dpb is deprecated (read - forbidden) to use.
> /* 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);
> char *stmt = new char[1024];Note double quote here.
> strcpy(stmt, "INSERT INTO Users (UserName, UserPassword)
>VALUES ('");
> if( isc_dsql_execute_immediate(status, &hDb, &hTx, 0, stmt,Note dialect 3 here. Do you still don't understand what is wrong?
>3, NULL) )
Read more about quoted identifiers in dialect 3.
>When I execute it I receive the following:Are you sure that your table was defined as Users and not "Users"?
>Dynamic SQL Error
>SQL Error code = -204
>Table unknown
>USERS
>When I run the same INSERT statement against the same database in ISQLSorry, but I can't believe it.
>it works without any errors at all.
>Can someone guide me as to what is wrong here?Quotes, IMHO.
--
SY, Dimitry Sibiryakov.