Android Question Index out of bounds?

hockeyadc

Member
Here is the code I have:

B4X:
Model = PartNum.text.Substring2(0,3)
cursor1 = SQL1.ExecQuery("SELECT Model_Code FROM Config WHERE Model= '" & Model &"'")
cursor1.Position = 0
FastTrack.Text = cursor1.GetString("Model_Code")

I am trying to assign the value it receives from the Model_Code column as a string to FastTrack.Text which is an Edit Text field. I am receiving an error, CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0. This happens on the FastTrack.Text line. What's wrong here?
 
Top