B4A Tutorial [B4X] SQL with Wait For - Erel    May 15, 2017   (21 reactions) The new resumable subs feature, introduced in B4J v5.50, B4i v4.00 and B4A v7.00 (to be soon released), makes it simpler to work with large data sets with minimum effect on the program responsiveness.
The new standard way to insert data is:
For i = 1 To 1000
sql.AddNonQueryToBatch("INSERT INTO B4J Question java.exe memory growing dramatically when using Sqlite - aeric (first post)    Jun 25, 2024   (1 reaction) WHERE p3 = ?" sql3.AddNonQueryToBatch(query1, Array(m.Get("a"), m.Get("b"), m.Get("av"), m.Get("bv"), p)) sql3.AddNonQueryToBatch(query2, Array(m.Get("a"), m.Get("b"), m.Get("av"), m.Get("bv"), p)) sql3.AddNonQueryToBatch(query3, Array(m.Get("a"), m.Get("b"), m.Get("av"), m.G B4A Question SQLite: preventing multiple calls to BeginTransaction - Mahares (first post)    May 23, 2021   (1 reaction) What about: sql.AddNonQueryToBatch(. FIrst result in this search: https://www.b4x./?query=AddNonQueryToBatch It has a built in begin/end transaction. After you first click the Button, immediately have: btn.enable =false, then when the transaction is successful and complete. enable the button: btn.e B4A Question I have a problem with SQLite that fails when inserting a large number of records into a table. Please Help. - Mahares (first post)    Mar 07, 2024   (4 reactions) Sometimes it is better and safer to use parameterized query.
So instead of:
SQL2.AddNonQueryToBatch("Insert Into masclis (codigo,nombre,nif,direccion,otro) Values ('123ED','','','','')",Null)
Use:
SQL2.AddNonQueryToBatch("Insert Into masclis (codigo,nombre,nif,direccion,otro) Values (?,?,?,?,?)", Ar B4J Tutorial Access DB (mdb) BeginTransaction and AddNonQueryToBatch - LucaMs    Mar 01, 2024   (1 reaction) I spent quite a bit of time tracking down an error that... wasn't in my project. To prevent you from doing it too...
I had to insert many records into an Access table.
I used a transaction (BeginTransaction).
The project produced no errors, but the table was empty.
I also tried AddNonQueryToBatch B4A Library Yet Another MySQL Library But With Stored Procedure Support and Cursors - keirS    Mar 15, 2015   (5 reactions) Sub Activity_Create(FirstTime As Boolean) If FirstTime Then MySQLConnection.Initialize(MYSQLIP,MYSQLDBNAME,MYSQLUSER, MySQLPASS,MYSQLPORT) End If 'return query as cursor MySQLConnection.ExecQuery("query","select * from products") 'Batch updates into a transaction B4A Question Error Save Blob to mysql table - Mahares (first post)    Sep 21, 2022   (2 reactions) If you need a push, it should be something like this, using string literals and parameterized query:
Starter.mysql.AddNonQueryToBatch($"Insert into t_dpt(no_kk,no_nik,nama,kota_lahir,tgl_lahir,
status_kawin,jenis_kelamin,alamat,no_rt,no_rw,kelurahan,
kecamatan,kota,propinsi,no_tps,di B4A Question How do I create a DB SQLite from the APP itself? - aeric (first post)    Jul 14, 2019   (3 reactions) DB.AddNonQueryToBatch(strSQL, Array(Application.VersionCode, DB_VERSION)) Dim SenderFilter As Object = DB.ExecNonQueryBatch("DB") Wait For (SenderFilter) DB_NonQueryComplete (Success As Boolean) Log("DB.ExecNonQueryBatch('DB'): " & Success) If Success Then B4A Question Updating local SQLite from remote MySQL - aeric (first post)    Oct 29, 2024 SQL1.AddNonQueryToBatch(strSQL, Array(row(0), row(1), row(2), row(3))) Next Dim SenderFilter As Object = SQL1.ExecNonQueryBatch("SQL") Wait For (SenderFilter) SQL_NonQueryComplete (Success As Boolean) Log("Data Insert: " & Success) Else B4A Question Max items of a List - list alternatives? - OliverA (first post)    Nov 23, 2017   (1 reaction) AddNonQueryToBatch is a great tool, but I wonder if it is necessary here (unless some sort of UI responsiveness is needed). The method adds the statement to an internal list and then ExecNonQueryBatch iterates over this list by calling ExecNonQuery2 for each statement in the list. This procedure is Page: 1   2   3   4   5   6   7   Powered by ColBERT |