Error connecting to MySQL via ODBC from Mocrosoft SQL Server Reporting Services.

I have a unique situation which i have not seen before.
I wrote reports and they are hosted on an SQL server reporting services 2000 portal.
This has always been working well and all reports were running fine until recently when out of the blue, both reports fetching data from MySQL repositories failed to run.

I created liked servers to mysql using the ODBC provider for Microsoft ODBC data sources.
I have tested the linked servers and I can browse the tables and even query for data successfully from enterprise manager and query analyser, however when I try to run any query from a report project in Visual Studio to any of the MySQL linked servers (just like I do it in Query analyser (using OPENQUERY function), I get the following error:

Microsoft Development Environment
An error occurred while executing the query.
ERROR [23000][MySQL][ODBC 3.51 Driver][mysqld-5.0.67]You have an error in your SQL syntax; .......

When i refresh the dataset in Visual studio, I then get another error:
Could not generate a list of fields for the query.
Check the query syntax or click refresh fields on the query toolbar.
There is already an open DataReader associated with this Connection which must be closed first.

When i run the query from Query analyser, it works perfectly!
The reports have not been changed. Could someone have got such a problem before? If so, how was it resolved?

Here's the environment in subject:
1. Visual Studio dot net 2003
2. DotNet Framework 1.1
3. SQL server 2000.
4. MySQL ODBC driver 3.1 (for Windows)
5. Windows 2003 server.
LVL 12
Chris MConsulting - Technology ServicesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can investigate in the mysql log file. In linux the file is named mysqld.log in the /var/log folder. However, in windows, I suspect it would be named similarly or somewhere else in an event log there. Sorry, not knowing exact place in Windows.

BTW, did you upgrade any databases or install any patches that broke it?
Chris MConsulting - Technology ServicesAuthor Commented:
Hi gtkfreak,
querying through the link directly using SQL server works perfectly but the issue seems to be with trying to query through the link from dotNet.
With SQL server's Enterprise manager and Query analyser, MySQL can be accessed perfectly. The linked server is fine and I can see the MySQL tables from SQL server's Enterprise manager. With Query Analyser, i can query the MySQL tables too.
If the problem was with MySQL, i would not have been able to see the data with SQL server's Enterprise manager, Query analyser and via ODBC.
The problem starts when I try to query MySQL from Visual studio.
Chris MConsulting - Technology ServicesAuthor Commented:
I highly suspect that Windows updates destabilised the drivers on the OS.
I cannot work with the link anymore but decided to write the report going directly via a MySQL DSN, not via the link to MySQL.

This resolved it!

Thanks for all your posts team.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris MConsulting - Technology ServicesAuthor Commented:
gtkfreak, thanks for your contribution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.