[Mono-list] Problem with Oracle and Mono Charset...

Hubert FONGARNAND hubertf-1@altern.org
Tue, 1 Mar 2005 11:05:41 +0100


I'm interested in implement connection pooling on oracle...
I just need some info about creating dllimport functions....

The C function is :
	OCIOCIConnectionPoolCreate((OCIEnv *)envhp,
                   (OCIError *)errhp, (OCICPool *)poolhp,
                   &poolName, &poolNameLen,
                   (text *)database,strlen(database),
                   (ub4) conMin, (ub4) conMax, (ub4) conIncr,
                   (text *)pooluser,strlen(pooluser),
                   (text *)poolpasswd,strlen(poolpasswd),
                   OCI_DEFAULT));

i've began :

			//fongarnand
			[DllImport ("oci")]
			internal static extern int OCIConnectionPoolCreate(IntPtr envhp,
				IntPtr errhp, IntPtr poolhp, ...

But i don't know wich datatype to use...		=09

Le Lundi 28 F=E9vrier 2005 13:55, Daniel Morgan a =E9crit=A0:
> Sure, you can implement.  We accept patches.
>
> You could look at System.Data.SqlClient on how it does connection pooli=
ng.
>
> Another way is to use some OCI functions for connection pooling.  So,
> you might have to create DllImport functions for these OCI functions.
>
> Oracle 9i Call Interface Programmer's Guide
> http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96584/oci=
15re
>2.htm#556061
>
> OCIConnectionPoolCreate
> OCIConnectionPoolDestroy
>
> Hubert FONGARNAND wrote:
> >Thank you for your fix... It works now without any problems...
> >Just a question, do you plan to implement connection pooling on oracle=

> > client classes. I've seen that dealing with oracle database works wel=
l
> > with mono (now) but it's much more slower than MS.NET when you open a=
nd
> > close many connections... Is there a way to speed up this process.
> >I'm ready to help you implementing this, if you need...
> >
> >Le Samedi 26 F=E9vrier 2005 05:38, vous avez =E9crit :
> >>I recently committed a fix to svn trunk HEAD for strings in
> >>OracleParameter to use OCIUnicodeToCharSet for Oracle data types date=
s,
> >>CLOBs, VARCHAR2/CHAR, etc...
> >>
> >>Can you try your tests again to see if they work now?  I do not know
> >>French to test the changes.  :-)
> >>
> >>Hubert FONGARNAND wrote:
> >>>Thanks to Daniel Morgan
> >>>DataTime and OracleDateTime works now perfectly. There's still a pro=
blem
> >>>with charset.When my NLS_LANG variable isn't set (on my mono client)=
,
> >>>french "=E9=E8" are seen as "??" in the database (MS.NET client see =
"??").
> >>>The only way to display the "=E9=E8" correctly is to set my NLS_LANG=
 to :
> >>>NLS_LANG=3D"FRENCH_FRANCE.UTF8" (but normally, the client should ada=
pt
> >>>itself to the server settings)
> >>>but there's still a problem with string length. eg: when I do an
> >>> "INSERT" with a string with some "=E9=E8" the string is "cut" by or=
acle, so
> >>> I can not see the entire string in the database...
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

--=20
Hubert FONGARNAND
Fiducial IT
_______________________________________________
Ce message et les =E9ventuels documents joints peuvent contenir des infor=
mations confidentielles.
Au cas o=F9 il ne vous serait pas destin=E9, nous vous remercions de bien=
 vouloir le supprimer et en aviser imm=E9diatement l'exp=E9diteur. Toute =
utilisation de ce message non conforme =E0 sa destination, toute diffusio=
n ou publication, totale ou partielle et quel qu'en soit le moyen est for=
mellement interdite.
Les communications sur internet n'=E9tant pas s=E9curis=E9es, l'int=E9gri=
t=E9 de ce message n'est pas assur=E9e et la soci=E9t=E9 =E9mettrice ne p=
eut =EAtre tenue pour responsable de son contenu.