mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 10:19:30 +02:00
* fcl-db: oracle connection fixes:
- unregister on finalization instead of register - check cursor is assigned in rowsaffected Patch by Laco. git-svn-id: trunk@27944 -
This commit is contained in:
parent
d83fb7790e
commit
7863213048
@ -732,7 +732,7 @@ end;
|
||||
function TOracleConnection.RowsAffected(cursor: TSQLCursor): TRowsCount;
|
||||
var rowcount: ub4;
|
||||
begin
|
||||
if OCIAttrGet((cursor as TOracleCursor).FOciStmt, OCI_HTYPE_STMT, @rowcount, nil, OCI_ATTR_ROW_COUNT, FOciError) = OCI_SUCCESS then
|
||||
if Assigned(cursor) and (OCIAttrGet((cursor as TOracleCursor).FOciStmt, OCI_HTYPE_STMT, @rowcount, nil, OCI_ATTR_ROW_COUNT, FOciError) = OCI_SUCCESS) then
|
||||
Result:=rowcount
|
||||
else
|
||||
Result:=inherited RowsAffected(cursor);
|
||||
@ -1112,6 +1112,6 @@ end;
|
||||
initialization
|
||||
RegisterConnection(TOracleConnectionDef);
|
||||
finalization
|
||||
RegisterConnection(TOracleConnectionDef);
|
||||
UnRegisterConnection(TOracleConnectionDef);
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user