Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SQL-Pro*C++ : Copying char* into VARCHAR
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