I have a simple table called MON_SCARICO :
sequenziale number(10)
tipo_record char(1)
hotel varchar2(5)
wher I use a TOracleQuery component for insert a record, if I specified the value of the char field directly on the sql text, there is no problem (1).
But if I use a variable for thar field, both otString or otChar I got the same error : ORA-1401 Inserted value too large for column (2).
Note that i use oracle db from 10 years and I know how to work.
The same query with the same parameters with the standard TQuery component work fine.
Is there any bug or something else ?
thanks in advance
1) THIS WORK
.....
Sql.Add( 'Insert into MON_SCARICO' );
Sql.Add( ' (Sequenziale,' );
Sql.Add( ' Tipo_Record,' );
Sql.Add( ' Hotel)' );
Sql.Add( 'values' );
Sql.Add( '
Sequenziale,' );
Sql.Add( ' ''M'',' );
Sql.Add( ' :Hotel)' );
.....
2) THIS DO NOT WORK
.....
Sql.Add( 'Insert into MON_SCARICO' );
Sql.Add( ' (Sequenziale,' );
Sql.Add( ' Tipo_Record,' );
Sql.Add( ' Hotel)' );
Sql.Add( 'values' );
Sql.Add( '
Sequenziale,' );
Sql.Add( ' :Tipo_Record,' );
Sql.Add( ' :Hotel)' );
DeleteVariables;
DeclareVariable( 'sequenziale', otFloat );
DeclareVariable( 'Tipo_Record', otString ); // OR otChar
DeclareVariable( 'Hotel', otString );
SetVariable( 'Sequenziale', Sequenziale );
SetVariable( 'Tipo_Record', 'M' );
SetVariable( 'Hotel', Hotel );
Execute;
sequenziale number(10)
tipo_record char(1)
hotel varchar2(5)
wher I use a TOracleQuery component for insert a record, if I specified the value of the char field directly on the sql text, there is no problem (1).
But if I use a variable for thar field, both otString or otChar I got the same error : ORA-1401 Inserted value too large for column (2).
Note that i use oracle db from 10 years and I know how to work.
The same query with the same parameters with the standard TQuery component work fine.
Is there any bug or something else ?
thanks in advance
1) THIS WORK
.....
Sql.Add( 'Insert into MON_SCARICO' );
Sql.Add( ' (Sequenziale,' );
Sql.Add( ' Tipo_Record,' );
Sql.Add( ' Hotel)' );
Sql.Add( 'values' );
Sql.Add( '

Sql.Add( ' ''M'',' );
Sql.Add( ' :Hotel)' );
.....
2) THIS DO NOT WORK
.....
Sql.Add( 'Insert into MON_SCARICO' );
Sql.Add( ' (Sequenziale,' );
Sql.Add( ' Tipo_Record,' );
Sql.Add( ' Hotel)' );
Sql.Add( 'values' );
Sql.Add( '

Sql.Add( ' :Tipo_Record,' );
Sql.Add( ' :Hotel)' );
DeleteVariables;
DeclareVariable( 'sequenziale', otFloat );
DeclareVariable( 'Tipo_Record', otString ); // OR otChar
DeclareVariable( 'Hotel', otString );
SetVariable( 'Sequenziale', Sequenziale );
SetVariable( 'Tipo_Record', 'M' );
SetVariable( 'Hotel', Hotel );
Execute;