[Mono-list] Mono on Windows 2003 Server - ODBC connection problem

Marcin P protected@poczta.onet.pl
Tue, 23 Mar 2004 08:56:31 +0100


Hello!
Firstly - sorry if this would be posted twice -
after first, unsuccesful attempt I have made the second.

I am completely new to Mono Project.
I must admit, that the progress you make
really amazed me and I'd like to congratulate
everyone who is involved in developing it.
I installed mono 0.30 (and yesterday upgraded to 0.31)
on my Windows 2003 Server machine.

Installation went smoothly, but later mono.exe was
displaying me the error that it cannot found
msvcr70.dll library - and in fact there wasn't
such a library in my Windows/System folder.
Anyway, copying this library from my
XP machine solved this problem.
So I went to simple example with odbc connection.
Although my example work very well in MS Framework,
when I port it to mono I always receive an error saying:
"Error in SQLAllocHandle"
I made some further test and found out, that this error
is thrown at the line:
m_cnADOConnection = new OdbcConnection();

what is a little bit strange - the line
m_cmdADOCommand = new OdbcCommand();
works well.
I also tested
m_cnADOConnection = new OdbcConnection(strConnectionString),
where strConnectionString contains valid connection string to my DB,
but the behaviour (and error) is the same.

I searched the archives of list and a very similar error was reported on
March 11th 2004,
but it was about Linux machine.

There is another slight strange behaviour which I don't understand -
anytime when I try to execute with mono my simple example
using System.Windows.Forms I get the message:
"Could not load winelib.exe.so", but then it runs almos OK
(despite the warning saying "Missing call to FillRectangle in
OnPaintBackground").

Could anyone give me a hint how to solve this issues?
Am I missing something?
Thanks in advance!

Best regards,

Marcin Pytel