Re: What changed with MySqlDbType.Datetime?
Posted by: Chris Cline
Date: November 30, 2004 11:07AM

From what I can gather the new DateTime type is causing the following not to function as it should.

This assumes you have a table that has a DateTime column and your using 4.1 Mysql with the 1.0.2 .Net Connector.

Calling DataAdapter.Fill() causes an casting exception.

or setting DataTable.Columns["yourcolun"].defaultvalue = DataTime.Today; causes a casting exception

or using parameters and passing a valid System.DateTime value into it gets an exception.

I have even seen this problem if I fill a datatable, bind it to a datagrid and try to update the datetime column.

It might be all related to the same idea unless a go digging around in the code.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.