Well I guess it is my turn to ask a question, since most of the time I spend answering questions on DaniWeb.
The Problem: DataViewGrid throws a "System.ArgumentException parameter is not valid..."
when the dataset contains an SQL 2005 TimeStamp type column.
The error occurs in System.Drawing.FromStream... da da da
It is because a TimeStamp is a Byte[8] unique value that my grid thinks is an image.
I am creating a type of Query Analyzer form. A simple select * from mytable is given to an adapter...
QueryDataSet.Tables.Clear();
SqlDataAdapter adapter = new SqlDataAdapter(Query, conn);
adapter.Fill(QueryDataSet,"Table");
DataResultsGrid.DataSource = QueryDataSet.Tables[0];
QueryBindingSource = new BindingSource(QueryDataSet, "Table");
DataResultsGrid.DataSource = QueryBindingSource;
The dataset reads the schema when I set its datasource to this table, later I set it to the bindingsource to get it hooked. I can pass any SQL statement and it works fine... until the schema contains a TimeStamp column and the datagrid is scrolled to the right where the timerstamp column would be visible.. then this exception is thrown for each row.
Any ideas ?
// Jerry