Subject Compiling embedded SQL for Microsoft Visual C++ 6.0
Author ted_hols
I'm having difficulty compiling a simple C++ class containing
Embedded SQL.

I'm using gpre to pre-process my code into C++, but when
I compile the C++ file, I get the following error:

error C2664: 'isc_attach_database' : cannot convert parameter 6
from 'const char [21]' to 'char *' Conversion loses qualifiers

The error refers to this code segment, and it's complaining about the
variable isc_4:

// Connect to the database at runtime
CONNECT :szDbName AS db1;*/
isc_attach_database (isc_status, 0, szDbName, &db1, isc_4l,
SQLCODE = isc_sqlcode (isc_status);

My database declaration is:

SET DATABASE db1 = STATIC 'e:\dummy.gdb'
PASSWORD "dummy";*/

and the declaration of isc_4 is:

static const char
isc_4 [] = {
isc_dpb_user_name,5, 'D','U','M','M','Y',
isc_dpb_password,5, 'd','u','m','m','y',
}; /* end of dpb string for request isc_4 */

Any ideas what the problem is?