I'm getting this error
Inconvertible type mismatch between SourceColumn 'book_image' of Byte[] and the DataColumn 'book_image' of Object.
My database datatype is BLOB for the image.
All of my screenshots of errors are in imgur over here >>
the screenshots - Album on Imgur[
^]
For each screenshot i wrote a description to describe the problem..
And finally the stack trace:
System.InvalidOperationException was unhandled
HResult=-2146233079
Message=Inconvertible type mismatch between SourceColumn 'book_image' of Byte[] and the DataColumn 'book_image' of Object.
Source=System.Data
StackTrace:
at System.Data.Common.DataColumnMapping.GetDataColumnBySchemaAction(String sourceColumn, String dataSetColumn, DataTable dataTable, Type dataType, MissingSchemaAction schemaAction)
at System.Data.Common.DataColumnMapping.GetDataColumnBySchemaAction(DataTable dataTable, Type dataType, MissingSchemaAction schemaAction)
at System.Data.Common.DataColumnMappingCollection.GetDataColumn(DataColumnMappingCollection columnMappings, String sourceColumn, Type dataType, DataTable dataTable, MissingMappingAction mappingAction, MissingSchemaAction schemaAction)
at System.Data.Common.DataTableMapping.GetDataColumn(String sourceColumn, Type dataType, DataTable dataTable, MissingMappingAction mappingAction, MissingSchemaAction schemaAction)
at System.Data.ProviderBase.SchemaMapping.SetupSchemaWithoutKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, Boolean gettingData, DataColumn parentChapterColumn, Object chapterValue)
at System.Data.ProviderBase.SchemaMapping..ctor(DataAdapter adapter, DataSet dataset, DataTable datatable, DataReaderContainer dataReader, Boolean keyInfo, SchemaType schemaType, String sourceTableName, Boolean gettingData, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMappingInternal(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMapping(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Library_Management_System.LMSDataSetTableAdapters.BooksTableAdapter.Fill(BooksDataTable dataTable) in C:\Users\laptop\Desktop\convert to materialskin\Library Management System\Library Management System\LMSDataSet.Designer.cs:line 4761
at Library_Management_System.BookReport.BookReport_Load(Object sender, EventArgs e) in C:\Users\laptop\Desktop\convert to materialskin\Library Management System\Library Management System\BookReport.cs:line 23
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
So based on the imgur screenshots and the stack trace, could you guys help me out please?
I am trying to display my images into the report viewer...
What I have tried:
I've provided clear information on how to help me :)
Since i've no idea what to do with this error, I haven't attempted anything yet..just waiting for someone to help me in the right direction