Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL-Pro*C++ : Copying char* into VARCHAR

SQL-Pro*C++ : Copying char* into VARCHAR

From: Serge LUCAS <Serge.Lucas_at_eurocontrol.fr>
Date: Tue, 09 Feb 1999 18:44:25 +0000
Message-ID: <36C08209.A18B7590@eurocontrol.fr>


I have a littele problem, which must have already be solved by many people:

void MyClass::f(char* str)
{
EXEC SQL BEGIN DECLARE SECTION;
        VARCHAR dest[20];
EXEC SQL END DECLARE SECTION; strcpy(dest,str);

//EXEC SQL INSERT etc...
}

Since the precompiler transform the VARCHAR as an unsigned char[20], the c++ compiler tells me:

Argument type 'unsigned char[20]' does not match expected parameter type 'const char *'.
strcpy(dest,str);

       ^^^^

Does anybody has a solution to this very simple problem ?

Thanks!
--
Serge LUCAS
STERIA ATM/Eurocontrol
BS-012
Tel 01 69 88 74 15
Fax 01 69 88 73 33
Mel lua_at_eurocontrol.fr Received on Tue Feb 09 1999 - 12:44:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US