jct24 / h2sharp

Automatically exported from code.google.com/p/h2sharp
0 stars 0 forks source link

DateTime loading fix #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define a datetime field in the H2 database, and try to load it.

What is the expected output? What do you see instead?
The interface crashes, I expect to load the datetime.

What version of the product are you using? On what operating system?
Latest H2Sharp from SVN.

Please provide any additional information below.
Please use the following code in H2DataReader:

public override DateTime GetDateTime(int ordinal)
{
  java.sql.Timestamp ts = set.getTimestamp(ConvertOrdnal(ordinal));
  if (ts == null)
  {
    return UTCStart;
  }
  return System.DateTime.Parse(ts.ToString());
}

Original issue reported on code.google.com by rene.ols...@gmail.com on 12 May 2012 at 8:45