[unixODBC-support] trouble with mysql driver on mono

James Smith james.smith at aleph-one.com
Wed May 5 14:58:45 BST 2010


Good afternoon all,

 

I posted this earlier to Nick Gorham but thought it best just to post to the
relevant mailing list after all. Nick, I guess you might prefer replying to
my enquiry (if you have the time and inclination, that is!) in the context
of this mailing list so that it gets archived. Here goes.

 

 

I have a website, http://www.jaspermusicstore.com/, with MySQL connectivity
working on all platforms apart from ASP. This is an Ubuntu box, and ASP is
served courtesy of mono. Since I can connect to MySQL on these other
platforms I'm assuming the problem is with my ODBC driver. I have unixodbc
installed, of course:

 

root at jms ~: dpkg --get-selections | grep odbc

libmyodbc                                       install

odbcinst1debian1                                install

unixodbc                                        install

root at jms ~:

 

My /etc/odbc.ini file remains empty, but I have added the following manually
to my /etc/obbcinst.ini file:

 

[MySQL]

Description = MySQL ODBC 3.51 Driver

Driver      = /usr/lib/odbc/libmyodbc.so

Setup       = /usr/lib/odbc/libodbcmyS.so

CPTimeout   =

CPReuse     =

 

The libraries referenced here are indeed present. I've double checked this. 

 

I use the driver from within my ASP web application with the following call:

 

OdbcConnection handle = new OdbcConnection(     "DRIVER={MySQL ODBC 3.51
Driver};" +

                                                "SERVER=" + host + ";" +

                                                "DATABASE=" + database + ";"
+

                                                "UID=" + username + ";" +

                                                "PASSWORD=" + password + ";"
+

                                                "OPTION=3"  );

 

handle.Open();                      

 

The open() method throws an exception with error code 80004005, which seems
singularly unhelpful!

 

Can you advise? Many thanks in advance for your time.

 

Kind regards,

 

James

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20100505/5a8fa5a0/attachment.html>


More information about the unixODBC-support mailing list