Sub btn1_Click
Dim cur As Cursor
cur = SQL1.ExecQuery("SELECT * FROM tabel1")
cur.Position = listt.meghdar
Dim fav As Int = cur.GetInt("fav")
Dim num As Int = cur.GetInt("id")
If fav = 0 Then
SQL1.ExecNonQuery("UPDATE tabel1 SET fav = 1 WHERE id=" & num)
ToastMessageShow("به علاقه مندی ها اضافه شد!!!",False)
Else
SQL1.ExecNonQuery("UPDATE tabel1 SET fav = 0 WHERE id=" & num)
ToastMessageShow("از علاقه مندی ها حذف شد!", False)
End If
End Sub
** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = true ** ** Activity (menu) Create, isFirst = true ** ** Activity (menu) Resume ** ** Activity (menu) Pause, UserClosed = false ** ** Activity (listt) Create, isFirst = true ** ** Activity (listt) Resume ** ** Activity (listt) Pause, UserClosed = false ** ** Activity (text) Create, isFirst = true ** ** Activity (text) Resume ** text_button1_click (java line: 407) java.lang.RuntimeException: Object should first be initialized. at anywheresoftware.b4a.sql.SQL.checkNull(SQL.java:48) at anywheresoftware.b4a.sql.SQL.ExecQuery(SQL.java:154) at ir.mahdikafshgar.mohamad.text._button1_click(text.java:407) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175) at anywheresoftware.b4a.BA.raiseEvent(BA.java:171) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78) at android.view.View.performClick(View.java:4204) at android.view.View$PerformClick.run(View.java:17355) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5041) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) java.lang.RuntimeException: Object should first be initialized. ** Activity (listt) Create, isFirst = true ** ** Activity (listt) Resume **
سوال
ali-akbar 1
سلام من این کد را میخوام اجرا بشه ارور میده
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (menu) Create, isFirst = true **
** Activity (menu) Resume **
** Activity (menu) Pause, UserClosed = false **
** Activity (listt) Create, isFirst = true **
** Activity (listt) Resume **
** Activity (listt) Pause, UserClosed = false **
** Activity (text) Create, isFirst = true **
** Activity (text) Resume **
text_button1_click (java line: 407)
java.lang.RuntimeException: Object should first be initialized.
at anywheresoftware.b4a.sql.SQL.checkNull(SQL.java:48)
at anywheresoftware.b4a.sql.SQL.ExecQuery(SQL.java:154)
at ir.mahdikafshgar.mohamad.text._button1_click(text.java:407)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:4204)
at android.view.View$PerformClick.run(View.java:17355)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Object should first be initialized.
** Activity (listt) Create, isFirst = true **
** Activity (listt) Resume **
لینک ارسال
به اشتراک گذاری در سایت های دیگر
2 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.