Datarow - Date type
Posted by: Mark Brennan
Date: January 06, 2005 11:55AM

We are developing a VB .net2003 application. We have a datarow that is defined based upon a row from a table. This table has a column of type 'date'. When we try to create a new row for this column within the datarow, we get an error.

The value of the date is from a textbox.

We have tried to convert the string value to a date, using the cdate function and get 'type value mismatch with column type cannot store <1/1/2005 12:00:00am> in column. expected type is MySqlDateTime'

sample of code:

datarow = dataset.tables(0).newrow
datarow.Item("collection_date") = cdate(me.tbddate.text)
dataset.tables(0).rows.add(datarow)

value of me.tbddate.text = 1/1/2005

We have tried using just the string value and get type conversion error.


We believe that the conversion is necessary, but the exact format, that we are not sure of.

Any help would be appreciated.

Thanks

Mark Brennan
Director - IT

Options: ReplyQuote


Subject
Written By
Posted
Datarow - Date type
January 06, 2005 11:55AM
January 07, 2005 09:18PM
January 12, 2005 01:01PM
January 13, 2005 03:50PM


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.