B4J Question how to execute a query to mysql, make it fast

fhersof

Member
Hello, please a little help, I am using B4J 8.80 with a mysql database, when I execute a query like the following one I notice that it takes time to execute, is it normal? is there a better way to do it? Thank you so much.
B4X:
Main.conn.ExecNonQuery2("INSERT INTO Productos(Codigo,Nombre,PrecioCompra,Precio1,Precio2,Precio3,Iva,Categoria,Stock,Stockmin,Observacion,Undmedi,Indexcat,Indexiva,Indexmed)Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", _
            Array As String(Txtcodigo.Text,Txtnombre.Text,txtpcompra.Text,Txtpvp1.Text,Txtpvp2.Text,Txtpvp3.Text,Txtiva.Text,spnalacat.Value,Txtstkact.Text,Txtstkmin.Text,Txtobserva.Text,Txtmedida.Text,spnalacat.SelectedIndex,Spniva.SelectedIndex,spnmedida.SelectedIndex))
 

amorosik

Expert
Licensed User
Hello, please a little help, I am using B4J 8.80 with a mysql database, when I execute a query like the following one I notice that it takes time to execute, is it normal? is there a better way to do it? Thank you so much.
B4X:
Main.conn.ExecNonQuery2("INSERT INTO Productos(Codigo,Nombre,PrecioCompra,Precio1,Precio2,Precio3,Iva,Categoria,Stock,Stockmin,Observacion,Undmedi,Indexcat,Indexiva,Indexmed)Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", _
            Array As String(Txtcodigo.Text,Txtnombre.Text,txtpcompra.Text,Txtpvp1.Text,Txtpvp2.Text,Txtpvp3.Text,Txtiva.Text,spnalacat.Value,Txtstkact.Text,Txtstkmin.Text,Txtobserva.Text,Txtmedida.Text,spnalacat.SelectedIndex,Spniva.SelectedIndex,spnmedida.SelectedIndex))

When you write "...it take time..." what mean exactly?
How many second?
 
Upvote 0
Top