Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Problems when Query.Params[i].DataType=ftMemo
Problems when Query.Params[i].DataType=ftMemo
Posted: 2000/10/09 10:21
 
I create dynamic parametrized query to update some table (something like "Insert into T (id, name) values (id, name)". To determine type of Query.Params I make "select * from T where 1=0" and copy InsQuery.Params[i].DataType := Query.Fields[i].DataType;
When varchar2 field size is > 255 I have Params[i].DataType := ftMemo. After Executing such query I have Access violations during disconnecting from database.
The workaround is to substitute ftString instead of ftMemo.
RE: Problems when Query.Params[i].DataType=ftMemo
Posted: 2000/10/23 11:32
 
When there is 2 Parameters of DataType ftMemo, 'ORA-01461: допускается привязка LONG значения только для занесения в столбец LONG' is raised. Both fields are VarChar2(4000).Updating any of them alone - works correct, but not both.
RE: Problems when Query.Params[i].DataType=ftMemo
Posted: 2000/11/01 17:52
 
Hi,
It is because Oracle allows to have in each moment only:
1) single LONG field in table/select list of query,
2) single parameters of LONG type.
By default NCOCI8 translates VARCHAR2(4000) into ftMemo. So, you have second limitation ...

To solve it, set TOCIQuery.DataFormat.EnableLongString := True. And if you will do that for TOCIDatabase.DefaultDataFormat.EnableLongString, then NCOCI8 will translate by default VARCHAR2(4000) into ftString.

Good luck !