B4J Question Unknown member: endtransaction

j_o_h_n

Active Member
Licensed User
Has EndTransaction been removed from Connection class?

B4X:
Dim sql1 As SQL = Main.pool.GetConnection
SQL1.BeginTransaction  'no problem , BeginTransaction appears in code completion drop down menu
Try
  'Execute the sql statements.
SQL1.TransactionSuccessful  'no problem , TransactionSuccessful appears in menu
Catch
'the transaction will be cancelled
End Try
SQL1.EndTransaction  'EndTransaction does not appear in menu and gives warning "unknown member: endtransaction" if you add it manually
 

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hi

SQL1.TransactionSuccessful - commits the transaction and ends it. Do not forget to SQL1.close to release the pool connection otherwise it will cause memory leaks for you.

Regards

John.
 
Upvote 0

j_o_h_n

Active Member
Licensed User
Hi

SQL1.TransactionSuccessful - commits the transaction and ends it. Do not forget to SQL1.close to release the pool connection otherwise it will cause memory leaks for you.

Regards

John.
Thanks John
What puzzled me was the example I posted above was from example code posted on this forum. If you look around there are many examples with EndTransaction
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
It looks like that exists only for Android
B4X:
        #if B4A
        sql_object.EndTransaction
        #end if
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…