[Mono-dev] Re: [Mono-devel-list] TimeStamp support on oracle...

Daniel Morgan monodanmorg at yahoo.com
Fri Sep 16 10:03:16 EDT 2005

Hello Hubert,
Hmmm...  I never did try filling a data set with a timestamp.  Only selecting and inserting via a parameter.
Internally, OracleDateTime uses a System.DateTime.  This should change.  We should separate the various parts in OracleDateTime.  I will look into System.DateTime to see how its implemented.  
An Oracle TIMESTAMP can have a milliseconds precision of up to 9 digits while System.DateTime is 3 (if my memory serves me correctly).  By default, a TIMESTAMP has a milliseconds precision of 6.  In Mono's OracleClient, the milliseconds are (in theory) are trimmed down to fit in a System.DateTime using division.   Maybe, we should be doing something different. Any suggestions?
Maybe we should be using an OracleDateTime internally instaed of System.DateTime in OciBindHandle, OciDefineHandle, and OracleDataReader.
What is the definition of your TIMESTAMPs?  How does some of your TIMESTAMPs look like?

Hubert FONGARNAND <informatique.internet at fiducial.fr> wrote:
> I committed to svn trunk HEAD support for Oracle TIMESTAMP using an
> OciDateTime descriptor.

I've update my mono from svn and i run a little test : 

cmd.Connection=new OracleConnection(cnx);
cmd.CommandText="SELECT datetime FROM essai";
OracleDataAdapter dta=new OracleDataAdapter(cmd);
DataSet ds = new DataSet();
foreach(DataRow row in ds.Tables["TABLE"].Rows)
I get :
*** glibc detected *** free(): invalid pointer: 0x082fe20c ***

It fails when it does dta.Fill
When i do a mono --trace the last line i get is :
. . . . . . . . . . ENTER: 
System.Data.OracleClient.Oci.OciDefineHandle:Dispose (bool)(this:0x5cf00
[System.Data.OracleClient.Oci.OciDefineHandle sqlserver.exe], 1, )
. . . . . . . . . . . ENTER: (wrapper managed-to-native) 
System.Runtime.InteropServices.Marshal:FreeHGlobal (intptr)(0x82ff9f4, )

Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050916/c65aa46e/attachment.html 

More information about the Mono-devel-list mailing list