Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: ORA-01475
ORA-01475
Posted: 2003/04/30 15:31
 
Hi,
I have developped a procedure using NOCi8 to load textfile in table and I get this error :

ORA 1475 ORA-01475 must reparse cursor to change bind variable datatype

when I have the folowing sequence.

Previous record : null value in a column defined as numeric.

Current record detecting the error : numeric value in the same column.

The source looks like :

If valueToInsert = '' then
Query.Params[i].asString := ''
else
if Query.Fields[i].Datatype = ftFloat
Query.Params[i].asFloat := StrToFloat(valueToInsert);

Have you any ideas about?

Thanks

RE: ORA-01475
Posted: 2003/05/05 15:30
 
to assign parameter NULL value
use Query.Params[i].Clear instead of
Query.Params[i].asString := ''
RE: ORA-01475
Posted: 2003/05/06 08:25
 
So I et this new error :
NOE7/VAR - Bad or undefined varaible [aramName] value type 0
RE: ORA-01475
Posted: 2003/05/07 08:01
 
Before executing query you have to assign a datatype to parameter. When you assign value to parameter using AsFloat, AsString etc, appropriate datatype is assigned implicitly.
When you assign value using AsString, then AsFloat to the same parameter, you get ORA-01475, because datatype is changing.
Param[i].Clear does not assign datatype, datatype remains intact.
If first record in you dataset appears to have null value, datatype remains unassigned, because AsFloat has not been used yet and you get NOE7/VAR.
The best way to deal with this issue is to assign Datatype explicitly before processing first record.
Param[i].Datatype := ftFloat
or if you have same number of fields ansd params
Query.Param[i].Datatype := Query.Fields[i].Datatype
RE: ORA-01475
Posted: 2003/05/07 08:26
 
thanks,
I will try it as soon as possible
RE: ORA-01475
Posted: 2003/05/07 12:17
 
It is OK,
Thanks