Subject Re: [firebird-support] API vs ISQL problems
Author Dimitry Sibiryakov
On 26 May 2005 at 19:27, edcurren wrote:

> 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 ISQL
>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.