[Mono-list] Solved:- Oracle Client Connection: Connection parameter not supported

Daniel Morgan monodanmorg at yahoo.com
Tue Oct 21 15:58:22 EDT 2008


The documentation on the wiki was updated based on a commit (check-in) to mono's subversion repository.  However, this commit was done after the branch for mono-2.0 was done. 

I will try to back-port this and other fixes for oracle to the mono 2.0 branch.


--- On Tue, 10/21/08, Gary Hodgson <gary.s.hodgson at gmail.com> wrote:

> From: Gary Hodgson <gary.s.hodgson at gmail.com>
> Subject: [Mono-list] Solved:- Oracle Client Connection: Connection parameter not supported
> To: mono-list at lists.ximian.com
> Date: Tuesday, October 21, 2008, 8:17 AM
> I post the following on the off-chance it saves some time
> for anyone who may
> be having the same problem.
> 
> I was connecting to an Oracle (10g) database using the
> instructions here:
> http://mono-project.com/Oracle, and everything was going
> swimmingly until I
> had to use a connection string as per the instructions at
> "Connection String
> Format using TNS network description which does not use a
> tnsnames.ora
> file".  I.e. using a connection string that looked
> like this:
> 
> string connectionString = "User
> ID=user;Password=password;Data
> Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA
> = (SID = database)(SRVR=DEDICATED)))";
>  
> 
> Under MS.NET this would work ok, but under Mono it would
> throw the
> following:
> 
> Unhandled Exception: System.ArgumentException: Connection
> parameter not
> supported: 'database)(SRVR'
>   at
> System.Data.OracleClient.OracleConnection.SetProperties
> (System.Collections.Specialized.NameValueCollection
> parameters) [0x00000]
>   at
> System.Data.OracleClient.OracleConnection.SetConnectionString
> (System.String connectionString, Boolean persistSecurity)
> [0x00000]
>   at System.Data.OracleClient.OracleConnection..ctor
> (System.String
> connectionString) [0x00000]
>   at (wrapper remoting-invoke-with-check)
> System.Data.OracleClient.OracleConnection:.ctor (string)
> 		  
> 		  
> 	
> With hindsight it's annoyingly obvious that by wrapping
> the data source in
> quotes solves the problem, i.e. 
> 
> string connectionString = "User
> ID=user;Password=password;Data Source=  \' 
> (DESCRIPTION=
> (ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA
> =
> (SID = database)(SRVR=DEDICATED)))  \'   ";
> 		
> 
> -- 
> View this message in context:
> http://www.nabble.com/Solved%3A--Oracle-Client-Connection%3A-Connection-parameter-not-supported-tp20087966p20087966.html
> Sent from the Mono - General mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


      


More information about the Mono-list mailing list