AkaiYon1003
Member
Below is my query:
For additional information, I attached a screenshot of my database design:
Lastly, below is the error I'm having:
Please let me know how I can fix this. Thank you very much.
Query:
Private res As ResultSet = modSQL.mysql.ExecQuery("SELECT tblActivities.activityID, tblActivities.Activity, tblActivities.Status, tblCommodities.commodity, tblMOT.mot, tblLedger.amount FROM (((tblLedger INNER JOIN tblMOT ON tblLedger.motID = tblMOT.motID) INNER JOIN tblCommodities ON tblLedger.commodityID_fk = tblCommodities.commodityID) INNER JOIN (tblEngagements INNER JOIN tblActivities ON tblEngagements.activityID_fk = tblActivities.activityID) ON tblLedger.engagementID_fk = tblEngagements.engagementID) INNER JOIN tblEvents ON tblEngagements.eventID = "& evntID &"")
For additional information, I attached a screenshot of my database design:
Lastly, below is the error I'm having:
Error:
Logger connected to: samsung SM-N976N
--------- beginning of main
Copying updated assets files (43)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Error occurred on line: 41 (EventPage)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1055)
at b4a.DailyTask.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1064)
at b4a.DailyTask.b4xpagesmanager._showpage(b4xpagesmanager.java:421)
at b4a.DailyTask.b4xpages._showpage(b4xpages.java:46)
at b4a.DailyTask.b4xmainpage._clv_itemclick(b4xmainpage.java:216)
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 anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1082)
at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:1045)
at b4a.example3.customlistview$ResumableSub_PanelClickHandler.resume(customlistview.java:805)
at b4a.example3.customlistview._panelclickhandler(customlistview.java:748)
at b4a.example3.customlistview._panel_click(customlistview.java:735)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5638)
at android.view.View$PerformClick.run(View.java:22430)
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:6176)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
... 30 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
... 31 more
Caused by: android.database.sqlite.SQLiteException: no such column: tblActivities.Activity (code 1): , while compiling: SELECT tblActivities.activityID, tblActivities.Activity, tblActivities.Status, tblCommodities.commodity, tblMOT.mot, tblLedger.amount FROM (((tblLedger INNER JOIN tblMOT ON tblLedger.motID = tblMOT.motID) INNER JOIN tblCommodities ON tblLedger.commodityID_fk = tblCommodities.commodityID) INNER JOIN (tblEngagements INNER JOIN tblActivities ON tblEngagements.activityID_fk = tblActivities.activityID) ON tblLedger.engagementID_fk = tblEngagements.engagementID) INNER JOIN tblEvents ON tblEngagements.eventID = 1
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1318)
at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1257)
at anywheresoftware.b4a.sql.SQL.ExecQuery2(SQL.java:223)
at anywheresoftware.b4a.sql.SQL.ExecQuery(SQL.java:211)
at b4a.DailyTask.eventpage._showdb(eventpage.java:133)
at b4a.DailyTask.eventpage._b4xpage_created(eventpage.java:114)
... 33 more
Please let me know how I can fix this. Thank you very much.