G gbzrope Member Licensed User May 15, 2019 #1 I have some code identical to the snippet below which works, but this part returns Fail The query iteslf is fine if I run it directly against the mysql database using TOAD. B4X: sSQL="INSERT INTO vehicledailychecksheaders(Vehicle, ChargeHand, Date) VALUES (860, 11, '2019-03- 21')" mysql.AddNonQueryToBatch(sSQL,Null) Dim SenderFilter As Object = mysql.ExecNonQueryBatch("SQL") Wait For (SenderFilter) SQL_NonQueryComplete (Success As Boolean) Log("NonQuery: " & Success)
I have some code identical to the snippet below which works, but this part returns Fail The query iteslf is fine if I run it directly against the mysql database using TOAD. B4X: sSQL="INSERT INTO vehicledailychecksheaders(Vehicle, ChargeHand, Date) VALUES (860, 11, '2019-03- 21')" mysql.AddNonQueryToBatch(sSQL,Null) Dim SenderFilter As Object = mysql.ExecNonQueryBatch("SQL") Wait For (SenderFilter) SQL_NonQueryComplete (Success As Boolean) Log("NonQuery: " & Success)
Erel B4X founder Staff member Licensed User Longtime User May 15, 2019 #2 Are you using JdbcSQL? What is the output of Log(LastException) ? Upvote 0
G gbzrope Member Licensed User May 15, 2019 #3 Erel said: Are you using JdbcSQL? Yes, against a remote mysql database. What is the output of Log(LastException) ? Click to expand... <facepalm> It is reporting an error with the sequel - a missing default value for a field not being sent. I removed the field from the target table - it is not used, and it now works. Thanks. Upvote 0
Erel said: Are you using JdbcSQL? Yes, against a remote mysql database. What is the output of Log(LastException) ? Click to expand... <facepalm> It is reporting an error with the sequel - a missing default value for a field not being sent. I removed the field from the target table - it is not used, and it now works. Thanks.