[Mono-devel-list] TimeStamp support on oracle...

Daniel Morgan danielmorgan at verizon.net
Sat Jul 30 01:46:54 EDT 2005


You may need to allocate a TimeStamp descriptor.  OciHandle might need
to be modified to create a TimeStamp descirptor.  See the difference
between a DATE and TIMESTAMP in table 3-2 below.  Notice how DATE is a
char[7] while TIMESTAMP is a descriptor which uses opache type of
OCIDateTime.

http://download-
east.oracle.com/docs/cd/B19306_01/appdev.102/b14250/oci03typ.htm#sthref450

Table 3-2 External Datatypes and Codes
EXTERNAL DATATYPE 	CODE 	PROGRAM VARIABLE 	OCI DEFINED CONSTANT

DATE 	              12   char[7]       SQLT_DAT
TIMESTAMP descriptor  187  OCIDateTime*  SQLT_TIMESTAMP

Also, it looks like you're doing a non-query below.  Can I any test
cases you have timestamp please?

On Fri, 2005-07-29 at 15:31 +0200, Hubert FONGARNAND wrote:
> I've made a new patch... It worked when I send a timestamp in string format, 
> but with binary format it fails after binding parameters t... with an 
> undebuggable error:
> Unhandled Exception: System.NullReferenceException: Object reference not set 
> to an instance of an object
> in <0x00000> <unknown method>
> in (wrapper managed-to-native) OciNativeCalls:OCIStmtExecute 
> (intptr,intptr,intptr,uint,uint,intptr,intptr,System.Data.OracleClient.Oci.OciExecuteMode)
> in <0x0002f> System.Data.OracleClient.Oci.OciCalls:OCIStmtExecute (IntPtr 
> svchp, IntPtr stmthp, IntPtr errhp, Boolean iters, UInt32 rowoff, IntPtr 
> snap_in, IntPtr snap_out, OciExecuteMode mode)
> in <0x000a8> System.Data.OracleClient.Oci.OciStatementHandle:Execute (Boolean 
> nonQuery, Boolean useAutoCommit, Boolean schemaOnly)
> in <0x00013> System.Data.OracleClient.Oci.OciStatementHandle:ExecuteNonQuery 
> (Boolean useAutoCommit)
> in <0x0005d> System.Data.OracleClient.OracleCommand:ExecuteNonQueryInternal 
> (System.Data.OracleClient.Oci.OciStatementHandle statement, Boolean 
> useAutoCommit)
> in <0x00081> System.Data.OracleClient.OracleCommand:ExecuteNonQuery ()
> in (wrapper remoting-invoke-with-check) 
> System.Data.OracleClient.OracleCommand:ExecuteNonQuery ()
> 
> i don't know why?
> Can you have a look on my patch...
> thanks!
> 





More information about the Mono-devel-list mailing list