I got an another error sir. String only without blob.
B4X:DB.PeparedStatement("INSERT INTO test SET text_ = ?") DB.SetPeparedString(1, EditText1.Text) DB.ExecutePeparedStatement
Connected to Database
java.sql.SQLException: Can't call commit when autocommit=true
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:878)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:874)
at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1599)
at de.donmanfred.b4a.MySQL.ExecutePeparedStatement(MySQL.java:298)
at ex.escalera.mysql.main._button3_click(main.java:390)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:163)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:77)
at android.view.View.performClick(View.java:4478)
at android.view.View$PerformClick.run(View.java:18698)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
java.sql.SQLException: Can't call commit when autocommit=true
Hi,
I couldn't find an answer to this, I need to load multiple params during the execution of the app so can't hard code as fixed string values
eg I might need to execute a statement like that given above 100 times while running the app and each time the values to be used in the ? will be different
Thanks in advance