I'm using TUniQuery + TUniTransaction and there is some behaviour what I dont fully understand yet, probably I missed some information.
My problems:
1, When the user presses CTRL+DELETE in a TDBGrid or someone calls TUniQuery,Delete on a query, without SQLDelete filled at all, the record still will be deleted, which I really dont want. At this point I can still see the record in the database with other applicaton, for example PLSQL developer. Is there any property to disable this feature or I have to Abort the process in the BeforeDelete event?
2, In this case the TUniTransaction stays Active (in transaction) and when I close the application without any explicit closing of this transaction, it commits the transaction (and the record is permanently gone) even if I set TUniConnection.AutoCommit = False and left TUniTransaction.DefaultCloseAction = taRollback which is default.
I want to strictly prevent any kind of automatic DML and transaction handling.
Help me in this case, please.
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
UniDAC 7.4.12
Delphi 7
Here is the properties of components to reproduce the mentioned behaviours (replaced the sensitive data with stars):
Code: Select all
object conMain: TUniConnection
AutoCommit = False
ProviderName = 'Oracle'
Port = 1521
SpecificOptions.Strings = (
'Oracle.Direct=True')
Options.AllowImplicitConnect = False
Options.KeepDesignConnected = False
Username = '*********'
Server = '************-****.***.***.***.**:1521/******'
LoginPrompt = False
end
object trMain: TUniTransaction
DefaultConnection = conMain
end
object qryDemo: TUniQuery
Connection = conMain
Transaction = trMain
SQL.Strings = (
'select * from demo_table')
DMLRefresh = True
end