jackow98 / F20SC---CW1

1 stars 0 forks source link

Issue with viewing favourites #2

Closed jackow98 closed 4 years ago

jackow98 commented 4 years ago
System.InvalidCastException: Specified cast is not valid.
  at at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
  at at System.Data.SQLite.SQLiteDataReader.GetInt32(Int32 i)
  at at Read_Favourites(ObjectMaterializer`1 )
  at at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext()
  at Browser.BrowserWindow`1.FavouritesButton_Click(Object sender, EventArgs e) in C:\Users\Owner\.ssh\F20SC---CW1\Coursework\WindowsFormsApplication2\BrowserWindow.cs:103
  at at System.Windows.Forms.Control.OnClick(EventArgs e)
  at at System.Windows.Forms.Button.OnClick(EventArgs e)
  at at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  at at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at at System.Windows.Forms.Control.WndProc(Message& m)
  at at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  at at System.Windows.Forms.Button.WndProc(Message& m)
  at at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  at at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
  at at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
  at at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
  at at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
  at at System.Windows.Forms.Application.Run(Form mainForm)
  at Browser.Program.Main() in C:\Users\Owner\.ssh\F20SC---CW1\Coursework\WindowsFormsApplication2\Program.cs:22

Issue with viewing favourites

jackow98 commented 4 years ago

The primary key in SQLite was TEXT not INT