iOS Question attempt to insert nil object from objects[3]?

tufanv

Expert
Licensed User
Hello,

While I am executing a sql query i am getting this error.

sqlfleet.ExecNonQuery("INSERT INTO tblfleet VALUES('19','0','"&lblmonthly3.Text&"','" & resultsetaircrafts.GetString("aircraft") & "','" &alinantur & "','" & "0" & "','" & lblcountry.text & txtcountry.text & "','" & NewID & "')")



TY
 
Last edited:

Pendrush

Well-Known Member
Licensed User
Your error is probably in this part
resultsetaircrafts.GetString("aircraft")
before
B4X:
sqlfleet.ExecNonQuery("INSERT INTO tblfleet VALUES('19','0','"&lblmonthly3.Text&"','" & resultsetaircrafts.GetString("aircraft") & "','" &alinantur & "','" & "0" & "','" & lblcountry.text & txtcountry.text & "','" & NewID & "')")
add this line and check log
B4X:
Log(resultsetaircrafts.GetString("aircraft"))
objects start from [0] I think.
 
Top