hello,
I'm updating a CLOB field in a table using bindparams with an SQLNet connection. The query passes without exception but the field is not updated in the DB.
The field is well updated via a TNS connection.
Is there any way I can use in ODAC in order to update a CLOB field with a SQLNet connection ?
Thx for your help
bindparams do not work with SQLNet Connection
here is my code :
StringOfChar( 'B',4000 ) the clob field is updated normally, 4001 characters the field is updated as empty.
var VQuery : TOraQuery ;
VConnection : TOraSession ;
begin
VQuery := TOraQuery.create(NIL) ;
VConnection := TOraSession.create(NIL) ;
try
VConnection.ConnectString := 'user/[email protected]:1521:DB' ;
VConnection.Options.Net := True;
VQuery.Connection := VConnection ;
VQuery.Options.DeferredLobRead:=False ;
VQuery.Options.CacheLobs:=True;
VQuery.Options.DeferredLobRead:=True ;
VQuery.SQL.Text := 'UPDATE MY_TABLE SET CLOB_FIELD = :XML WHERE ID = 1' ;
VQuery.ParamCheck := True ;
VQuery.Prepare ;
VQuery.ParamByName('XML').ParamType:=ptInput;
VQuery.ParamByName('XML').DataType := ftMemo ;
VQuery.ParamByName('XML').value := StringOfChar( 'B',4001 ) ;
VQuery.ExecSQL ;
finally
VQuery.Free ;
VConnection.Free ;
end ;
end;
thx for your help
StringOfChar( 'B',4000 ) the clob field is updated normally, 4001 characters the field is updated as empty.
var VQuery : TOraQuery ;
VConnection : TOraSession ;
begin
VQuery := TOraQuery.create(NIL) ;
VConnection := TOraSession.create(NIL) ;
try
VConnection.ConnectString := 'user/[email protected]:1521:DB' ;
VConnection.Options.Net := True;
VQuery.Connection := VConnection ;
VQuery.Options.DeferredLobRead:=False ;
VQuery.Options.CacheLobs:=True;
VQuery.Options.DeferredLobRead:=True ;
VQuery.SQL.Text := 'UPDATE MY_TABLE SET CLOB_FIELD = :XML WHERE ID = 1' ;
VQuery.ParamCheck := True ;
VQuery.Prepare ;
VQuery.ParamByName('XML').ParamType:=ptInput;
VQuery.ParamByName('XML').DataType := ftMemo ;
VQuery.ParamByName('XML').value := StringOfChar( 'B',4001 ) ;
VQuery.ExecSQL ;
finally
VQuery.Free ;
VConnection.Free ;
end ;
end;
thx for your help