[ubuntu-mono] [Bug 551632] [NEW] database connection using ODBC always fails

Selmi selmi at centrum.sk
Tue Mar 30 12:57:38 BST 2010


Public bug reported:

Binary package hint: mono

> 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu.
system is Ubuntu lucid (development branch) Release 10.04 beta1 with all updates up to 30th march 2010
> 2) The version of the package you are using, via 'apt-cache policy packagename' or by checking in Synaptic.
 i am not sure which exactly package is responsible for this, but most probably its libmono-data2.0-cil
> 3) What you expected to happen
i expected to succesfully connect to database using odbc
> 4) What happened instead
i got incomplete error message about datasource name not found

all packages mentioned later came from lucid lynx beta 1 clean install +
last updates. only exception is freetds, which is compiled from cvs
version, because stable version from repository didn't worked for me

i created .freetds.conf which points to microsoft sql database on other
computer and verified with tsql that its correct, i can connect and
launch queries on it

then i created .odbc.ini and .odbcinst.ini which define datasource which
uses freetds driver and server definition from .freetds.conf, again i
confirmed using iodbctest that its correct, i can connect and work with
this datasource using connection string "DSN=mssql;UID=xxx;PWD=yyy"

now with mono i can't connect
first i got error about missing libodbc.so. it really doesn't exist in /usr/lib, so i made symlink to /usr/lib/iodbc.so.2
since then i get error with incomplete error message: "ERROR [IM002] [iODBC][Driver Manager]Data source name not found and n"

I tried various possibilities to define connection string - I tried
"DSN=mssql;UID=xxx;PWD=yyy", "mssql",
"{Driver=TDS};SERVER=mssql;UID=xxx;PWD=yyy;DATABASE=zzz" and some other
combinations of these, but error message is always the same

i copied compiled binary to windows and tried it there with odbc source,
it connected without any problem. because of fact that the same binary
works in windows and  because i am 100% sure that odbc source is valid
and working i think problem must lay somewhere in mono itself
(especially when i consider its not even able to  show full error
message....)

c# source i tried is attached

** Affects: mono (Ubuntu)
     Importance: Undecided
         Status: New

-- 
database connection using ODBC always fails
https://bugs.launchpad.net/bugs/551632
You received this bug notification because you are a member of Ubuntu
CLI/Mono Uploaders, which is subscribed to mono in ubuntu.

Status in “mono” package in Ubuntu: New

Bug description:
Binary package hint: mono

> 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu.
system is Ubuntu lucid (development branch) Release 10.04 beta1 with all updates up to 30th march 2010
> 2) The version of the package you are using, via 'apt-cache policy packagename' or by checking in Synaptic.
 i am not sure which exactly package is responsible for this, but most probably its libmono-data2.0-cil
> 3) What you expected to happen
i expected to succesfully connect to database using odbc
> 4) What happened instead
i got incomplete error message about datasource name not found

all packages mentioned later came from lucid lynx beta 1 clean install + last updates. only exception is freetds, which is compiled from cvs version, because stable version from repository didn't worked for me

i created .freetds.conf which points to microsoft sql database on other computer and verified with tsql that its correct, i can connect and launch queries on it

then i created .odbc.ini and .odbcinst.ini which define datasource which uses freetds driver and server definition from .freetds.conf, again i confirmed using iodbctest that its correct, i can connect and work with this datasource using connection string "DSN=mssql;UID=xxx;PWD=yyy"

now with mono i can't connect
first i got error about missing libodbc.so. it really doesn't exist in /usr/lib, so i made symlink to /usr/lib/iodbc.so.2
since then i get error with incomplete error message: "ERROR [IM002] [iODBC][Driver Manager]Data source name not found and n"

I tried various possibilities to define connection string - I tried "DSN=mssql;UID=xxx;PWD=yyy", "mssql", "{Driver=TDS};SERVER=mssql;UID=xxx;PWD=yyy;DATABASE=zzz" and some other combinations of these, but error message is always the same

i copied compiled binary to windows and tried it there with odbc source, it connected without any problem. because of fact that the same binary works in windows and  because i am 100% sure that odbc source is valid and working i think problem must lay somewhere in mono itself (especially when i consider its not even able to  show full error message....)

c# source i tried is attached





More information about the Ubuntu-mono mailing list