Only datetime objects can be serialized exception
On a windows form there is a textbox to enter a persons date of birth. This is a string. In mysql there is dob set for DATE (not DATETIME).
I masked the textbox and in code check it then re order it for mysql:
ElseIf DobRegEx.IsMatch(strDobCheck) Then
Dim strDateOrder As String = "${Year}${Month}${Day}"
strDataDob = RegEx.Replace(strDobCheck, strDateFind, strDateOrder)
'TODO: send strDataDob to database
End If
strDobCheck is the str from the textbox.
in the add newrow I have:
...
newRow("dob") = strDataDob
...
ds.update...
It was my impression that mysql handled the conversion from string to date. But I get the Only Datetime objects can be serialized by MySqlDateTime expection thrown when it tries the update.
Mysql 4.0.20 and the latest MySql Connector/Net being used.
Any help appreciated.
tk
Subject
Written By
Posted
Only datetime objects can be serialized exception
December 16, 2004 04:17PM
December 16, 2004 04:49PM
December 21, 2004 10:23AM
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.