Dear Forum
I was trying to create a table with the following code:
But get the following error:
(MySQLSyntaxErrorException) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''Export' (REF TEXT,DES TEXT,COBA TEXT,QUANTPHY INTEGER, USER TEXT, ZONE TEXT)' at line 1
Need help to fix this error.
I was trying to create a table with the following code:
B4X:
Wait For (Connect) Complete (Success As Boolean)
If Success Then
Try
' mysql.ExecNonQuery("CREATE TABLE TEST (REF TEXT,DES TEXT,COBA TEXT,QUANTPHY INTEGER, USER TEXT, ZONE TEXT)")
' mysql.ExecNonQuery("SET @Export = "STBIS")
' mysql.ExecNonQuery(" SET @@ExportDB = Export")
' Log(Export_Base)
' mysql.ExecNonQuery("CREATE TABLE @ExportDB (REF TEXT,DES TEXT,COBA TEXT,QUANTPHY INTEGER, USER TEXT, ZONE TEXT)")
mysql.ExecNonQuery2("CREATE TABLE ? (REF TEXT,DES TEXT,COBA TEXT,QUANTPHY INTEGER, USER TEXT, ZONE TEXT)",Array As Object (Export_Base))
' Dim sf As Object = mysql.ExecQueryAsync("mysql", "SELECT DES, COBA FROM articles WHERE QUANTPHY > ?", Array(10))
' mysql.ExecNonQuery2
' Wait For (sf) mysql_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
' If Success Then
' Do While Crsr.NextRow
' Log($"DES: ${Crsr.GetString("DES")}, COBA: ${Crsr.GetString("COBA")}"$)
' Loop
' Crsr.Close
' End If
Catch
Success = False
Log(LastException)
End Try
CloseConnection
End If
Return Success
But get the following error:
(MySQLSyntaxErrorException) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''Export' (REF TEXT,DES TEXT,COBA TEXT,QUANTPHY INTEGER, USER TEXT, ZONE TEXT)' at line 1
Need help to fix this error.