ارر دیتابیس
سلام خسته نباشید
ببخشید کسی میدونه این ارر چی میخواد بگه؟
Error occurred on line: 26 (frm_food_info) android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0 at android.database.AbstractCursor.checkPosition(AbstractCursor.java:460) at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:136) at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:50) at anywheresoftware.b4a.sql.SQL$CursorWrapper.GetString(SQL.java:377) at b4a.example.frm_food_info._activity_create(frm_food_info.java:370) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at b4a.example.frm_food_info.afterFirstLayout(frm_food_info.java:104) at b4a.example.frm_food_info.access$000(frm_food_info.java:17) at b4a.example.frm_food_info$WaitForLayout.run(frm_food_info.java:82) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6144) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
کدهایی که زدم اینان
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout(“frm_food_info”)
Main.cur=Main.sql.ExecQuery(“SELECT * FROM tbl_ashpazi2 WHERE id=”&id2)
Main.cur.Position=id2
lbl_onvan.Text=Main.cur.GetString(“foodname”)
Dim lbl_txt_info As Label
lbl_txt_info.Initialize(“lbl_txt_info”)
slv_food_info.Panel.AddView(lbl_txt_info,0,0,100%x,100%y)
lbl_txt_info.Text=Main.cur.GetString(“foodtext”)
Dim stu As StringUtils
lbl_txt_info.Height=stu.MeasureMultilineTextHeight(lbl_txt_info,lbl_txt_info.Text)
slv_food_info.Panel.Height=lbl_txt_info.Height
End Sub
خط ۲۶ هم اینه
lbl_onvan.Text=Main.cur.GetString(“foodname”)
ممنونم
پاسخ ( 1 )
سلام.
پوزیشن رو چی گذاشتی؟!
و این که حلقه فورت کو؟!