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

Discussion in 'iOS Questions' started by tufanv, Jun 12, 2015.

  1. tufanv

    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: Jun 12, 2015
  2. Pendrush

    Pendrush Well-Known Member Licensed User

    Try to use
    sqlfleet.ExecNonQuery2
     
  3. tufanv

    tufanv Expert Licensed User

    Ty for answer. I have billions of code with execnonquery changing all to execnonquery2 will take too much time. Maybe there is another solution ?
     
  4. Pendrush

    Pendrush Well-Known Member Licensed User

    Your error is probably in this part
    resultsetaircrafts.GetString("aircraft")
    before
    Code:
    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
    Code:
    Log(resultsetaircrafts.GetString("aircraft"))
    objects start from [0] I think.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice