Hi guys,
I have this code
Raised an error "illegal Argument exception"
Change the codes to this
Runs OK.
Where did I go wrong?
I have this code
B4X:
InsQry.ExecNonQuery2("insert into t_in_ot1 (id,id_trs_typ,id_cst_sppl,trs_dt,dscp,inp_by) values(?,?,?,?,?,?)", _
Array As Object(IdInOt1,42,459,"11/30/2017","this is a test","abc"))
Raised an error "illegal Argument exception"
Change the codes to this
B4X:
Private Str As StringBuilder
Str.Initialize
IdCnt = 459
Dt = "11/30/2017"
InpBy = "abc"
Str.Append("insert into t_in_ot1 (id,id_trs_typ,id_cst_sppl,trs_dt,dscp,inp_by) ")
Str.Append("values(" & IdInOt1 & ",42," & IdCnt & ",'" & Dt & "','This is a test','" & InpBy & "')" )
Log(Str)
InsQry.ExecNonQuery(Str)
Runs OK.
Where did I go wrong?