Hi there,
I've just made a patch to Oracle.pas (v3.3.1) to fix a problem I encountered - you may wish to include it in future releases if it hasn't already been fixed in 3.4.
The problem occurred when trying to create a new TOracleObject for a collection type, as OCI_TYPECODE_OBJECT was specified in the call to OCIObjectNew. I copied some code from TOracleQuery and changed this call as follows:
constructor TOracleObject.Create(ASession: TOracleSession;
const ATypeName: string;
const ATable: string);
var TableOwner, TableName: string;
Dot: Integer;
ObjectTypeCode: OCITypeCode;
function TDOToTypeCode(ATDO: OCIType): OCITypeCode;
{... copied from TOracleQuery and modified so it would compile here ...}
end;
begin
{...}
ObjectTypeCode := TDOToTypeCode(TDO);
OCICall(OCIObjectNew(Session.envhp, errhp, Session.svchp,
ObjectTypeCode,//OCI_TYPECODE_OBJECT,
TDO, Table, OCI_DURATION_SESSION,
Table = nil, Instance));
{...}
end;
Best Regards,
Paul Ward
I've just made a patch to Oracle.pas (v3.3.1) to fix a problem I encountered - you may wish to include it in future releases if it hasn't already been fixed in 3.4.
The problem occurred when trying to create a new TOracleObject for a collection type, as OCI_TYPECODE_OBJECT was specified in the call to OCIObjectNew. I copied some code from TOracleQuery and changed this call as follows:
constructor TOracleObject.Create(ASession: TOracleSession;
const ATypeName: string;
const ATable: string);
var TableOwner, TableName: string;
Dot: Integer;
ObjectTypeCode: OCITypeCode;
function TDOToTypeCode(ATDO: OCIType): OCITypeCode;
{... copied from TOracleQuery and modified so it would compile here ...}
end;
begin
{...}
ObjectTypeCode := TDOToTypeCode(TDO);
OCICall(OCIObjectNew(Session.envhp, errhp, Session.svchp,
ObjectTypeCode,//OCI_TYPECODE_OBJECT,
TDO, Table, OCI_DURATION_SESSION,
Table = nil, Instance));
{...}
end;
Best Regards,
Paul Ward