SQL. BeginTransactionBegins a transaction. A transaction is a set of multiple "writing" statements that are atomically committed,hence all changes will be made or no changes will be made. As a side effect those statements will be executed significantly faster (in the default case a transaction is implicitly created for each statement). It is very important to handle transaction carefully and close them. The transaction is considered successful only if TransactionSuccessful is called. Otherwise no changes will be made. Typical usage: SQL1.BeginTransaction Try 'block of statements like: For i = 1 to 1000 SQL1.ExecNonQuery("INSERT INTO table1 VALUES(...) Next SQL1.TransactionSuccessful Catch Log(LastException.Message) 'no changes will be made End Try SQL1.EndTransaction B4J Tutorial [WebApp] Concurrent access to SQLite databases - Erel    Nov 21, 2021   (14 reactions) .b4x.com/b4j/help/jsql.html#sql_begintransaction... such as MySQL and others. However they can still be perfect for small / medium solutions, especially if... databases. You need to follow these instructions: - Use a single SQL object that is shared by all... set the journal mode to wal: sql.ExecQuerySingleResult("PRAGMA journal_mode = wal".... B4J SQL library (when initialized with InitializeSQLite) will serialize writers access. - When... 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... B4A Tutorial SQL tutorial - Erel    Oct 2, 2019   (19 reactions)   tags: sqliteimages, begin transaction, SQL .BeginTransaction Try For i = 1 To 500 SQL1.ExecNonQuery2("INSERT INTO table1 VALUES... the transaction block should usually look like: SQL1.BeginTransaction Try 'Execute the sql... methods: SQL with Wait For The following tutorial is obsolete: This tutorial covers the SQL library and its usage with Basic4android. There are many general SQL tutorials that cover the actual SQL language. If you are not familiar with SQL it is recommended to start with such a tutorial. SQL... Share My Creation User Login + MySQL PHP API - aeric    Apr 24, 2024   (31 reactions) Web API Updates: For B4J API Server and cross platform client apps, please check MySQL API Server (Key + Token) and User Login Apps https://www.b4x.com/android/forum/threads/b4j-mysql-api-server-key-token-and-b4x-user-login-apps.126081/ 94106 94119 94118 Android App 94107941089411194112 94109 102583 This is the 3rd version of login example I share in this forum. The first version I shared when I started learning B4A is just a very simple login app. Http Login example using... B4A Question strange TransactionSuccessful - emexes (first post)    Dec 22, 2022   (1 reaction) Probably clearer by the code example at: https://www.b4x.com/android/help/sql.html#sql_begintransaction
SQL1.BeginTransaction
Try
'block of statements like:
For i = 1 to 1000
SQL1.ExecNonQuery("INSERT INTO table1 VALUES(...)
Next
SQL1.TransactionSuccessful
Catch
Log(LastException.Message) 'no changes will be made
End Try
SQL1.EndTransaction... B4J Question Error message, SQL (ucanaccess-5.0.0) - aeric (first post)    Aug 16, 2020 How about writing like this?
sql.BeginTransaction
sql.ExecNonQuery(strSQL)
sql.ExecNonQuery("COMMIT;")
sql.TransactionSuccessful
... Share My Creation [B4J] MySQL API Server (Key + Token) and [B4X] User Login Apps - aeric    Apr 24, 2024   (35 reactions) Updates: For latest version of B4J Web API Server, working with cross platform B4X client apps and web front-end, please check Web API Template supporting MySQL and SQLite backend 105281 Finally I would like to share my B4J API server written in B4J. Compare to my previous PHP API, this API server implements user access token to authorize user to consume the API. SQL.zip - SQL script to create necessary database and tables in MySQL server. jAPI.zip - Source code for server app... B4i Question Sqlite BeginTransaction error: database is locked - Erel (first post)    Aug 1, 2019 Do you call SQL.BeginTransaction anywhere in your code? Do you later close the transaction? Does it work if you close 'c' before calling s.ExenNonQuery?... B4J Question [Solved] MySql INSERT IGNORE - udg    May 1, 2023 on one of its fields.
Currently my code is something like:
Dim sql1 As SQL = pool.GetConnection
sql1.BeginTransaction
Try
sql1.ExecNonQuery2($"INSERT IGNORE INTO xxxx (id,a,b,c...("err",0)
sql1.TransactionSuccessful
Catch
risp.Put("err",-101)
risp.Put("errmsg", LastException.Message)
sql1.Rollback
End Try
sql1... B4A Question How to make a transaction rollback? - OliverA (first post)    Mar 21, 2020   (2 reactions) Calling EndTransaction without calling TransactionSuccessful is the same as doing a rollback. See https://www.b4x.com/android/help/sql.html#sql_begintransaction... Page: 1   2   3   4   5   6   7   |