I have updated monodevelop on Ubuntu 14.04 from version 4.2 to 5.10.
I was able to connect the oracle databases using ODBC successfully earlier in version 4.2
After update to 5.10, my codes stopped connecting to the database and i am getting the error stating
"ERROR [IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified"
I have checked in the system, my machine is properly configured to connect the database using ODBC.
I am also able to connect the database using isql through odbc seamlessly.
I think that there is something missing in the update, that is limiting my code to connect to the database.
An early response will be highly appreciable.
I am attaching the basic code that i created for the testing purposes.
public void TestODBCConn()
System.Data.Odbc.OdbcConnection Conn = new OdbcConnection(connString);
string sql="Select count(*) from partymst";
System.Data.Odbc.OdbcDataAdapter da = new OdbcDataAdapter(sql,Conn);
System.Data.DataSet ds = new DataSet();
Console.WriteLine (E.Message+ " at: " +System.DateTime.Now.ToString("yyyyMMddHHmmss"));
the system is throwing error at Conn.Open();
Created attachment 15464 [details]
Snapshot showing successful connection through odbc
I am also attaching a snapshot showing that i am able to connect to the database using isql, and odbc is properly configured in the machine.
My guess is that at the same time we switched from Mono BCL to MS referencesource BCL (Mono 4.2) this broke. Probably when Abhinav switched from monodevelop 4.2 to 5.10 Ubuntu upgraded Mono at the same time.
Looking at the referencesource code it appears to mostly wrap Odbc32.dll in both the referencesource version
and the old version
Abhinav, what mono version are you running ( ie what do you get if you run mono --version )? Do you know if you were running the same version of Mono when this was working?
Would it be practical for you to downgrade to the previous Mono and see if it starts working again?
We do not at present have a setup here for testing ODBC. I'd wonder, if you simply included the old System.Data.Odbc classes into your application instead of including from the System.Data DLL https://github.com/mono/mono/tree/8ac788afb3b9f0d529d11291f99b270ce626d891/mcs/class/System.Data/System.Data.Odbc if you could get the old, working ODBC behavior even post-4.2.
After upgrade I had following mono version.
Mono JIT compiler version 4.2.3 (Stable 18.104.22.168/832de4b Wed Mar 16 13:19:08 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
I tried downgrading the system and its working fine as it was working earlier.
I am working with the downgraded version only.
Hope the issue get resolved in the next update.
Thanks and Regards.
Hi, I'm having the exact same problem. Any news about when a fix will be available or which older version to use?