Paul McNett wrote:
> Ed Leafe wrote:
>> On Aug 15, 2007, at 6:30 PM, Paul McNett wrote:
>>
>>> Again, I believe that AutoCommit is named almost backwards, and  
>>> that we
>>> need a new ExplicitTransactions property.
>>      AutoCommit has nothing to do with transactions.         All it is 
>> designed  
>> to do is control the additional commit() call that some backends  
>> require after data is changed.
> 
> I don't understand how AutoCommit couldn't have anything to do with 
> transactions, if commit() commits a transaction.
> 
> If I understand correctly, most backends require you to commit your 
> transaction explicitly before any of your data becomes permanent in the 
> db. This is because most backends implicitly BEGIN a transaction if a 
> DML command comes through with no transaction already opened on that 
> connection.
> 
> But... they don't require that the transaction be committed right after 
> the DML command. They just require that it happen sometime, or the 
> changes will be lost.
> 
> Is my understanding different than yours?
>

You are nearly right with the above.
See my reply to Ed.

> 
>>      If you are using transactions under programmatic control, then there  
>> is no reason whatsoever that you would want this behavior, and so you  
>> would set AutoCommit to True to tell Dabo not to add the additional  
>> commit() call. I realize that this may not be the optimum name, which  
>> is why I took the time to explain the derivation of the behavior and  
>> how it came to be a property, and why I said that I think that a  
>> discussion of a better name would be welcome.
> 
> If I understand Uwe correctly, Dabo is still committing automatically 
> even with AutoCommit set to True.
> 
> 

Yes dabo does a commmit with dCursorMixin.flush().

It' not possible to set AutoCommit to True for firebird.

  File "/home/uwe/mysrc/ugfw/fwadm/EtypEnumForm.py", line 39, in
createBizobjs
    etypBizobj.AutoCommit = True
  File "/usr/lib/python2.5/site-packages/dabo/biz/dBizobj.py", line
1485, in _setAutoCommit
    self._syncWithCursors()
  File "/usr/lib/python2.5/site-packages/dabo/biz/dBizobj.py", line
1470, in _syncWithCursors
    crs.AutoCommit = self._autoCommit
  File "/usr/lib/python2.5/site-packages/dabo/db/dCursorMixin.py", line
2022, in _setAutoCommit
    self.BackendObject.setAutoCommitStatus(self, val)
  File "/usr/lib/python2.5/site-packages/dabo/db/dBackend.py", line 211,
in setAutoCommitStatus
    raise ValueError, "Can't set AutoCommit to True for this backend."
ValueError: Can't set AutoCommit to True for this backend.



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to