[00000001] 2021-08-23 15:42:58 ERROR LoggingSQLiteCommand.ExecuteReader : SELECT DISTINCT s.session_id, IFNULL(s.track_id, ''), s.session_date_time, s.season_id, s.date_hour, s.date_minute, s.race_day, s.time_multiplier, s.session_duration, s.round, s.session_type, s.is_wet_session, s.type_id, IFNULL(l.car_model_id, -1) car_model_id, s.event_online_reference, s.total_time, s.lap_count, s.session_position, s.ideal_line_grip, s.outside_line_grip, s.marbles_level, s.puddles_level, s.wet_dry_line_level, s.wet_level, s.ambient_temperature, s.road_temperature, s.wind_speed, s.wind_direction, s.cloud_level, s.rain_level, s.is_dynamic, s.ambient_temperature_mean, IFNULL(s.player_race_number, -101), IFNULL(p.points1, 0), IFNULL(p.points2, 0), IFNULL(p.points3, 0), IFNULL(p.points4, 0), IFNULL(p.points5, 0), s.is_online, s.player_ecu_mode, IFNULL(s.recorded_by, ""), IFNULL(s.peak_acceleration, -1), IFNULL(s.max_speed, -1), IFNULL(s.fuel_per_lap, 0), IFNULL(mean.avg_lap_time, -1), IFNULL(s.position_start_session, 0), IFNULL(notes.notes, ''), IFNULL(c.car_id, -1), IFNULL(s.dry_tyre_name, ''), IFNULL(s.wet_tyre_name, ''), IFNULL(s.replay_start_time, ''), IFNULL(s.pre_session_time, ''), IFNULL(s.penalty_time, 0) FROM session_def AS s LEFT OUTER JOIN ( SELECT laps.session_id, laps.car_id, laps.car_model_id, c.race_number, c.car_id FROM laps INNER JOIN session_cars c ON c.session_id = laps.session_id AND c.car_id = laps.car_id GROUP BY laps.session_id, laps.car_id, laps.car_model_id, c.race_number ) AS l ON s.season_id=l.session_id AND IFNULL(s.player_race_number, -101) != -999 AND ((s.player_race_number is null and l.car_id=0) OR IFNULL(s.player_race_number, -101)=l.race_number) LEFT OUTER JOIN session_points p ON s.season_id=p.session_id AND l.car_id=p.car_id LEFT OUTER JOIN session_avg_times mean ON s.season_id=mean.session_id LEFT OUTER JOIN session_notes notes ON s.session_id=notes.session_id LEFT OUTER JOIN session_cars c ON s.season_id=c.session_id AND s.player_race_number=c.race_number WHERE s.recorded_by !='ARC' AND car_model_id=@car_model_id AND s.track_id IN (@trackCode0, @trackCode1, @trackCode2) ORDER BY s.session_date_time DESC LIMIT 1000
@car_model_id=24
@trackCode0=spa_2019
@trackCode1=spa
@trackCode2=spa_2020
[00000001] 2021-08-23 15:42:58 ERROR ResultsDB.retrieveSessionDetails : Error reading sesson details with query
SELECT DISTINCT s.session_id, IFNULL(s.track_id, ''), s.session_date_time, s.season_id, s.date_hour, s.date_minute, s.race_day, s.time_multiplier, s.session_duration, s.round, s.session_type, s.is_wet_session, s.type_id, IFNULL(l.car_model_id, -1) car_model_id, s.event_online_reference, s.total_time, s.lap_count, s.session_position, s.ideal_line_grip, s.outside_line_grip, s.marbles_level, s.puddles_level, s.wet_dry_line_level, s.wet_level, s.ambient_temperature, s.road_temperature, s.wind_speed, s.wind_direction, s.cloud_level, s.rain_level, s.is_dynamic, s.ambient_temperature_mean, IFNULL(s.player_race_number, -101), IFNULL(p.points1, 0), IFNULL(p.points2, 0), IFNULL(p.points3, 0), IFNULL(p.points4, 0), IFNULL(p.points5, 0), s.is_online, s.player_ecu_mode, IFNULL(s.recorded_by, ""), IFNULL(s.peak_acceleration, -1), IFNULL(s.max_speed, -1), IFNULL(s.fuel_per_lap, 0), IFNULL(mean.avg_lap_time, -1), IFNULL(s.position_start_session, 0), IFNULL(notes.notes, ''), IFNULL(c.car_id, -1), IFNULL(s.dry_tyre_name, ''), IFNULL(s.wet_tyre_name, ''), IFNULL(s.replay_start_time, ''), IFNULL(s.pre_session_time, ''), IFNULL(s.penalty_time, 0) FROM session_def AS s LEFT OUTER JOIN ( SELECT laps.session_id, laps.car_id, laps.car_model_id, c.race_number, c.car_id FROM laps INNER JOIN session_cars c ON c.session_id = laps.session_id AND c.car_id = laps.car_id GROUP BY laps.session_id, laps.car_id, laps.car_model_id, c.race_number ) AS l ON s.season_id=l.session_id AND IFNULL(s.player_race_number, -101) != -999 AND ((s.player_race_number is null and l.car_id=0) OR IFNULL(s.player_race_number, -101)=l.race_number) LEFT OUTER JOIN session_points p ON s.season_id=p.session_id AND l.car_id=p.car_id LEFT OUTER JOIN session_avg_times mean ON s.season_id=mean.session_id LEFT OUTER JOIN session_notes notes ON s.session_id=notes.session_id LEFT OUTER JOIN session_cars c ON s.season_id=c.session_id AND s.player_race_number=c.race_number WHERE s.recorded_by !='ARC' AND car_model_id=@car_model_id AND s.track_id IN (@trackCode0, @trackCode1, @trackCode2) ORDER BY s.session_date_time DESC LIMIT 1000
SQL logic error
ambiguous column name: car_model_id
at ACCResults.DBModel.LoggingSQLiteCommand.ExecuteReader() in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\DBModel\LoggingSQLiteCommand.cs:line 83
at ACCResults.ResultsDB.retrieveSessionDetails(String sessionId, String seasonId, Boolean useDateFilter, String dateFrom, String dateTo, String filterCar, String filterTrack, String filterSession, Boolean filterWet, Boolean filterEvent, String onlineFilter, String pbFilter, String carClass, String championshipId, List`1 seasonIds, Boolean showUnpairedOnly) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\DBModel\ResultsDB.cs:line 1521
Caused by :
at ACCResults.ResultsDB.retrieveSessionDetails(String sessionId, String seasonId, Boolean useDateFilter, String dateFrom, String dateTo, String filterCar, String filterTrack, String filterSession, Boolean filterWet, Boolean filterEvent, String onlineFilter, String pbFilter, String carClass, String championshipId, List`1 seasonIds, Boolean showUnpairedOnly) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\DBModel\ResultsDB.cs:line 1675
at ACCResults.ResultsDB.retrieveSessionDetails(String sessionId, String seasonId, Boolean useDateFilter, String dateFrom, String dateTo, String filterCar, String filterTrack, String filterSession, Boolean filterWet, Boolean filterEvent, String onlineFilter, String pbFilter, String carClass, String championshipId) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\DBModel\ResultsDB.cs:line 1146
at ACCResults.OLVHelpers.OLVControlSessions.populateSessionDetails(SessionFilter filter) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\OLVHelpers\OLVControlSessions.cs:line 1049
at ACCResults.TabControls.TabControlSessions.populateSessionDetails(SessionFilter filter) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\TabControls\TabControlSessions.cs:line 219
at ACCResults.TabControls.TabControlSessions.sessionFilterControl_FilterChanged(Object sender, EventArgs e) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\TabControls\TabControlSessions.cs:line 294
at ACCResults.Controls.SessionFilterControl.FireFilterChanged(Object sender, EventArgs e) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\Controls\SessionFilterControl.cs:line 140
at ACCResults.Controls.SessionFilterControl.cbCar_SelectedIndexChanged(Object sender, EventArgs e) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\Controls\SessionFilterControl.cs:line 123
at ACCResults.Controls.ComboBoxTemplate.FireSelectedIndexChanged(Object sender, EventArgs e) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\Controls\ComboBoxTemplate.cs:line 26
at ACCResults.Controls.ComboCarList.cbCar_SelectedValueChanged(Object sender, EventArgs e) in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\Controls\ComboCarList.cs:line 109
at System.Windows.Forms.ListControl.OnSelectedValueChanged(EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedValueChanged(EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at ACCResults.Program.Main() in E:\Users\Doug\OneDrive\Documents\Doug's Documents\VS Projects\TestApp\TestApp\Program.cs:line 19