Hi,

        I want to enhance oracle datetime parameter support. Today, 
oracledatetime
parameter is sended as a string to the oracle server... It's not the way that
MS.NET does...
MS.NET send the datetime in a byte array. This method don't depend on the
NLS_DATE_FORMAT parameter.
I think it would be better if mono use this method.

There's a OCI method to do that : OCIDateTimeToArray
So i've imported OCIDateTimeToArray and OCIDateTimeFromText in OCICalls.cs :

internal static int OCIDateTimeToArray (IntPtr hndl,
                        IntPtr errhp, IntPtr datetime, IntPtr interval, byte[] 
outarray,
 [MarshalAs (UnmanagedType.U4)] out int length, uint fsprec)
                {
                        return
OciNativeCalls.OCIDateTimeToArray(hndl,errhp,datetime,interval,outarray, out
length,fsprec);
                }


internal static int OCIDateTimeFromText (IntPtr hndl,
                        IntPtr errhp, [In][Out] byte[] date_str, uint 
dstr_length,
                        [In][Out] byte[] fmt, uint fmt_length,
                        [In][Out] byte[] lang_name,uint lang_length, IntPtr 
datetime)
                {
                        return
OciNativeCalls.OCIDateTimeFromText(hndl,errhp,date_str,dstr_length,fmt,fmt_le
ngth,lang_name,lang_length,datetime); }

We must :
-create a OCIDateTime structure with the sDate String (with
OCIDateTimeFromText)
-convert this OCIDateTime structure to a byte array with (OCIDateTimeToArray)

but i don't know how to allocate a OCIDateTime Structure in managed code...
Could you help me to implement that????

Hubert FONGARNAND

-------------------------------------------------------
_______________________________________________
Ce message et les �ventuels documents joints peuvent contenir des informations 
confidentielles.
Au cas o� il ne vous serait pas destin�, nous vous remercions de bien vouloir 
le supprimer et en aviser imm�diatement l'exp�diteur. Toute utilisation de ce 
message non conforme � sa destination, toute diffusion ou publication, totale 
ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'�tant pas s�curis�es, l'int�grit� de ce 
message n'est pas assur�e et la soci�t� �mettrice ne peut �tre tenue pour 
responsable de son contenu.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to