<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Verdana><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>hi:</FONT></DIV>
<DIV><FONT size=2>I use these code to connect to oracle on ubuntu 7.04 and mono 
1.2.4</FONT></DIV>
<DIV><FONT size=2>----------------------</FONT></DIV>
<DIV>&nbsp;&nbsp;public static void Main (string[] 
args)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;try{&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;System.Data.OracleClient.OracleConnection 
con = new 
System.Data.OracleClient.OracleConnection();<BR>&nbsp;&nbsp;&nbsp;&nbsp;con.ConnectionString 
="Data Source=huaxe;User 
ID=wordlibrary;Password=hello";<BR>&nbsp;&nbsp;&nbsp;&nbsp;con.Open();<BR>&nbsp;&nbsp;&nbsp;&nbsp;con.Close();<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;}catch(Exception 
ex){&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("error:" + 
ex.StackTrace);<BR>&nbsp;&nbsp;&nbsp;&nbsp;Exception e = 
ex.InnerException;<BR>&nbsp;&nbsp;&nbsp;&nbsp;while(e != 
null){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("inner :" + 
e.Message);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e = 
e.InnerException;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}</DIV>
<DIV>----------------------</DIV>
<DIV>then it output this error message:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>error:&nbsp; at (wrapper managed-to-native) OciNativeCalls:OCIEnvCreate 
(intptr&amp;,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)<BR>&nbsp; 
at System.Data.OracleClient.Oci.OciCalls.OCIEnvCreate (System.IntPtr&amp; 
envhpp, OciEnvironmentMode mode, IntPtr ctxp, IntPtr malocfp, IntPtr ralocfp, 
IntPtr mfreep, Int32 xtramem_sz, IntPtr usrmempp) [0x00000] in 
/tmp/scratch/BUILD/mono-1.2.4/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs:721 
<BR>&nbsp; at System.Data.OracleClient.Oci.OciEnvironmentHandle..ctor 
(OciEnvironmentMode mode) [0x00000] <BR>&nbsp; at 
System.Data.OracleClient.Oci.OciGlue.CreateConnection (OracleConnectionInfo 
conInfo) [0x00000] in 
/tmp/scratch/BUILD/mono-1.2.4/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OciGlue.cs:86 
<BR>&nbsp; at 
System.Data.OracleClient.OracleConnectionPoolManager.CreateConnection 
(OracleConnectionInfo info) [0x00006] in 
/tmp/scratch/BUILD/mono-1.2.4/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPoolManager.cs:57 
<BR>&nbsp; at System.Data.OracleClient.OracleConnectionPool.CreateConnection () 
[0x0000e] in 
/tmp/scratch/BUILD/mono-1.2.4/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs:97 
<BR>&nbsp; at System.Data.OracleClient.OracleConnectionPool.GetConnection () 
[0x000bb] in 
/tmp/scratch/BUILD/mono-1.2.4/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs:74 
<BR>&nbsp; at System.Data.OracleClient.OracleConnection.Open () [0x00061] in 
/tmp/scratch/BUILD/mono-1.2.4/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnection.cs:352 
<BR>&nbsp; at (wrapper remoting-invoke-with-check) 
System.Data.OracleClient.OracleConnection:Open ()<BR>&nbsp; at 
databaseDemo.MainClass.Main (System.String[] args) [0x00011] in 
/home/yuehuaqi/projects/mono/databaseDemo/databaseDemo/Main.cs:23 </DIV>
<DIV>------------------------------</DIV>
<DIV>who can tell me why ? </DIV>
<DIV>btw: I had install oracle 10g client successed.</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanks a lot. ^_^</DIV>
<DIV>This is my first mail.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV align=left><FONT size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV>
<DIV><FONT color=#c0c0c0><FONT size=2>yuehuaqi</FONT></DIV>
<DIV><FONT size=2>2007-07-30</FONT></FONT></DIV></FONT></BODY></HTML>