B4A Tutorial SQL tutorial - Erel    
Oct 2, 2019   
(21 reactions).BeginTransaction
Try
For i = 1 To 500
SQL1.ExecNonQuery2("INSERT INTO table1 VALUES ('def', ?, ?)", Array As Object(i, i))
Next
SQL1.TransactionSuccessful
Catch
Log(LastException.Message)
End Try
SQL1.EndTransaction
End Sub
This code... the transaction block should usually look like:
SQL1.BeginTransaction
Try
'Execute the sql...
link: . ?
Is that a typo?
SQL1.BeginTransaction
Try
'Execute the sql statements.
SQL.TransactionSuccessful...
B4A Question JRDC2 MySQL Begin Transaction, Commit, Rollback - zabayin (first post)    
Oct 21, 2020
Why not? It will create a single transaction for the commands and will rollback and changes if there is an error.
OOPS! seems I'm misunderstanding about single transaction can't be rollback and changes in database. thank you very much....
link: transaction for the commands and will rollback and changes if there is an error....
link: Does jrdc2 Can Rollback Transaction if lost connection to MySQL Database from VPS Server ? (Not...
Italian SQL1.EndTransaction - Elric (first post)    
Dec 8, 2021 remoto ha MySql, la app utilizza Sqlite.
Intendevo esattamente questo. Così ha senso inserire 1000...
link: i dati aggiornati registrandoli in locale. Poi lavoro sui dati locali.
Il server remoto ha MySql, la app...
link: Intanto auguri di pronta guarigione!
Poi, grazie mille a tutti!
Thanks a lot to all
Infine:
Nota ...
link: Mancava l'articolo, maremma bislacca.
Non è la febbre, è fare più cose contemporaneamente, che ...
B4A Question SQL operations in service, with transaction. The result: database is locked (code 5) - rosippc64a (first post)    
Jul 10, 2024The idea is good, but my application is too complex (and used by many) to completely rewrite. Anyway, I opened two new sql objects but that didn't help either, however, by eliminating the transaction, it no longer gives the error and works fine. This is definitely not the right solution...
link: transaction statement down to where you actually start writing and see if that helps.
To avoid issues...
link: to update records in two tables. Obviously all this is done in the context of a transaction, my...
B4A Question java.sql.SQLException: Could not retrieve transaction read-only status from server - aeric (first post)    
Oct 20, 2023Is the server running on new version of MySQL?
Please post your jdbcUrl and the whole error message.
Check this post:
https://www.b4x.com/android/forum/threads/jdbcsql-insert-error.133527/...
link: ok. but under Release, Error occurred, java.sql.SQLException: Could not retrieve transaction read...
B4A Question SQL: Asynchronous NonQuery Transaction Routine - Mahares    
Jan 15, 2013 I have introduced below correct?
'SQL1.BeginTransaction
'Try
For i = 1 To 10000
...)))
Next
sql1.ExecNonQueryBatch("SQL")
'SQL1.TransactionSuccessful
'Catch
...
link: SQL.ExecNonQueryBatch creates its own transaction. There is no need to create one yourself...
link: Thanks my friend mc73. I have a feeling it is needed. It will be interesting to see if Erel has test...
link: a begin/end transaction built-in, since we're talking about batch process. I find your question very...
B4J Question Rollback method has replaced EndTransaction for SQL Class - j_o_h_n    
Mar 7, 2021tl,dr 1: In the SQL class, the Rollback method has replaced EndTransaction.
2: BeginTransaction does not always begin a new Transaction.
When I was looking at SQL examples here I came across some that made use of the EndTransaction method
However this method no longer exists for the SQL... unparameterised data caused
an exception:
Sub Timer1_tick()
Try
SQL1.BeginTransaction...
SQL1.TransactionSuccessful
Catch
'I should have had SQL1.Rollback here to...
B4J Question jSQL - How to set TransactionIsolation - Erel (first post)    
Sep 3, 2020
Dim connection As JavaObject = SQL1
connection = connection.GetField("connection")
connection.RunMethod("setTransactionIsolation", Array(2)) 'TRANSACTION_READ_COMMITTED...
link: ();
sqlConnSession.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
...
Try
SQL1...
B4J Question SQL BeginTransaction...TransactionSuccessful - cyiwin (first post)    
Sep 11, 2014   
(2 reactions)I wanted to post a basic Batch SQL example in case anyone needs...
#Region Project Attributes..., "jdbc:mysql://serversite/site", "user", "pword")
SQL_Write_Data
End Sub...
link: I see my mistake.
I was using
SQL1.Close
instead of
pool.GetConnection.Close
Now with the correct...
link: Also the server company is Web Hosting Hub and I'm using their phpMyAdmin if that makes any diff...
link: breaking out the array part and setting discrete values before the SQL statement and then inserting...
B4A Question Problem Database "Malformed" on some tables. - vecino    
May 13, 2021I'm having trouble making a copy of the BD to save.
First I close the DB, then I do a file.Copy finally I open the DB.
SQL.Close, close pending transactions, if any?
Is there a command to check if there are pending transactions and be able to execute them?
Something like:
if SQL.INTRANSACTION Then.
SQL.TRANSACTION.CLOSE
I do not know if I should also save the file -Journal of the database.
Can you orient myself with this topic?
Thanks....
Page: 1  
2  
3  
4  
5  
6  
7