Bug #15081 Cannot add tables in the DataSource panel in Visual Studio 2005
Submitted: 20 Nov 2005 15:18 Modified: 22 Nov 2005 1:22
Reporter: Marc Puig
Status: Verified
Category:Connector/ODBC Severity:S3 (Non-critical)
Version:3.51.12 OS:Microsoft Windows (All)
Assigned to: Jim Winstead Target Version:
Triage: D2 (Serious)

[20 Nov 2005 15:18] Marc Puig
Description:
Now that Microsoft has released the new Visual Studio 2005, can we reopen the bug #9570?

The bug is still alive, and is :

Cannot add tables in the DataSource panel using the wizard in Visual Studio 2005.

You can select the database, select the table, but when finish the wizard, an
error appears "One or more errors occurred while processing the following
database objects" and the message follows with "could not find table
'databaseName..tableName' "

Mysql version 5.0.15.
.NET framework 2.0.40607

How to repeat:
- Select the DATASOURCES tab
- Click "Add new data source"
- Select the opcion "DATABASE"
- Select "new connection"
- Select ".NET framework Data Provider for ODBC"
- Select the DSN you want to use
- Test connection --> Test connection succesfully
- Click OK
- Browse the tables in the database and select one of them
- Click FINISH

The error appears.

Suggested fix:
I asked Microsoft, and they answered :

This problem occurs since the data source does not support schemas. Data tools in VS 2005
by default do not support this. There is however a mechanism where by the provider and
extend tool support.
[22 Nov 2005 1:22] Jorge del Conde
Thanks for your bug report.  I reproduced this using a demo copy of VS2005
[1 Mar 2006 23:08] David Carpenter
Has anyone tried to use the MySQL Connector Net 1.0.7 instead of the ODBC connector? I
would, but don't know how to add it as a data source in the wizard.
[19 Mar 2006 20:31] Andrew Cook
David: See bug 18342. Connector/Net has its own special Visual Studio Data Tools-related
problems.
[27 Jul 2007 20:25] Jim Winstead
I have re-verified this bug by creating a dummy C# application in VS2005, then selecting
"Data->Add New Data Source" from the menu. I'm not sure what "DATASOURCES tab" the
original bug reports are referring to.

It's not clear if this is a driver bug or a bug in how Visual Studio (or the .NET
framework Data Provider for ODBC) is accessing tables. The driver appears to correctly
report that schemas are not supported, but I'm not sure if this is even being checked.

We may need to add an option to treat MySQL databases as schemas, instead of treating
them as catalogs, as the driver currently does.

In any case, using Connector/Net with .NET applications is definitely the way to go.