Problem with time type when accessing from VB.NET
Posted by:
Mikko
Date: August 24, 2004 12:03AM
I'm using MySQL 4.0.15, ODBC driver 3.51.6 (I think so...?) & VB.NET (Visual Studio 2003). I had troubles to connect to db with different methods so that's why I use this setup...
Now, I have defined in db date and time fields in several tables and I have no problems to write values to them from VB.
But, my problem is, when I try to read time value, .NET will throw an exception (invalid cast) if I try to use date type in VB as suggested in type conversions somewhere in this site. If i change type in VB to timespan (as suggested in error msg), I can read time but it's value is 0 which is not correct. I made a little experiment and if I change type in db to datetime I can read it correctly but there's another problem: I cannot select by certain date, this will return an empty set (likely some format issue?)...
As there are already several hundreds of thousands of records in my db now with timestamps, is there any possibility to access them (time fields I mean :-)
Subject
Written By
Posted
Problem with time type when accessing from VB.NET
August 24, 2004 12:03AM
September 06, 2004 07:13PM
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.