Occasional memmory leak in Unicode=true mode
Posted: Sun 26 Nov 2006 12:41
We are using OraDirect .NET 3.50.10 in our .Net application and Oracle 9.2.0.4. In application we use a lot of OracleCommands with insert SQL statements like:
INSERT INTO ptn_events_and_phone_lines
(ptneapl_id, ptneapl_event_id)
values
(ptn_events_and_phone_lines_seq.NEXTVAL, :ptneapl_event_id)
The parameters list was created automatically by ODAC internal wizard. Every parameters was by VarChar type. And all works fine before we set Unicode=true. We starts to receive a lot of strange exceptions from Oracle that some of requered parameters was not sended or sended with null value. After that happened I change all parameters types to there real types, e.g. from Varchar to Integer and Number. This problem was solved, but found another one. Sometimes, on some dedicated computers in parameters of Varchar type was inserted with correct entered info some garbage from memmory. The single suspicious place is in the Varchar parameters. In ODAC wizard there is possibile to set parameter length. May be I must set Varchar parameter length manually for every parameter of Varchar type? And what this parameter means? If in DB I am using to store string Varchar2(1000) and in .Net application string, which length I must set in parameter. 1000? or 1000/3? or 1000*3?
INSERT INTO ptn_events_and_phone_lines
(ptneapl_id, ptneapl_event_id)
values
(ptn_events_and_phone_lines_seq.NEXTVAL, :ptneapl_event_id)
The parameters list was created automatically by ODAC internal wizard. Every parameters was by VarChar type. And all works fine before we set Unicode=true. We starts to receive a lot of strange exceptions from Oracle that some of requered parameters was not sended or sended with null value. After that happened I change all parameters types to there real types, e.g. from Varchar to Integer and Number. This problem was solved, but found another one. Sometimes, on some dedicated computers in parameters of Varchar type was inserted with correct entered info some garbage from memmory. The single suspicious place is in the Varchar parameters. In ODAC wizard there is possibile to set parameter length. May be I must set Varchar parameter length manually for every parameter of Varchar type? And what this parameter means? If in DB I am using to store string Varchar2(1000) and in .Net application string, which length I must set in parameter. 1000? or 1000/3? or 1000*3?