advansis Active Member Licensed User Longtime User Sep 5, 2018 #1 Hi guys, when I try to execute a command like this : Dim Result as string=SQL.ExecQuerySingleResult2("... my query string ...",Array As Object(Null,1)) I get the error: java.lang.IllegalArgumentException: method anywheresoftware.b4a.sql.SQL.ExecQuerySingleResult2 argument 2 has type java.lang.String[], got java.lang.Object[] In Erel's tutorial (here: https://www.b4x.com/android/forum/threads/sql-tutorial.6736/#content) "array as object" it is used with "ExecNonQuery2". I think I need the "object array" instead of "string array", because I want to distinguish between NULL values in database an the string "null"... Thanks in advance. PS. I do not know the table structure because the query is built at runtime
Hi guys, when I try to execute a command like this : Dim Result as string=SQL.ExecQuerySingleResult2("... my query string ...",Array As Object(Null,1)) I get the error: java.lang.IllegalArgumentException: method anywheresoftware.b4a.sql.SQL.ExecQuerySingleResult2 argument 2 has type java.lang.String[], got java.lang.Object[] In Erel's tutorial (here: https://www.b4x.com/android/forum/threads/sql-tutorial.6736/#content) "array as object" it is used with "ExecNonQuery2". I think I need the "object array" instead of "string array", because I want to distinguish between NULL values in database an the string "null"... Thanks in advance. PS. I do not know the table structure because the query is built at runtime
Erel B4X founder Staff member Licensed User Longtime User Sep 6, 2018 #2 It should be an array of strings in B4A. It is an array of objects in B4J and B4i. Pass the Null value in the query itself. Upvote 0
It should be an array of strings in B4A. It is an array of objects in B4J and B4i. Pass the Null value in the query itself.