Bug #40600 Unable to view tables in Visual Studio 2005 Server Explorer
Submitted: 9 Nov 2008 15:23 Modified: 31 Aug 2009 12:06
Reporter: Glenn Robnett Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1.5-win64 OS:Windows (Vista Home Premium 64 bits SP1)
Assigned to: Lawrenty Novitsky CPU Architecture:Any

[9 Nov 2008 15:23] Glenn Robnett
Description:
Installed the connector (MyODBC 5.1.5-win64), set up the data source name and tested via the control panel with no issues.

Opened up Visual Studio 2005 latest version to date (Version 8.0.50727.867 with Vista patch).
Opened Server Explorer panel, Data Connections and connected to the MySql server.
Under Data Connections, the Tables icon shows no tables (there should be two tables in my test dbase).
The table columns for both tables shows up in the Views icon, under a "null" sub-folder.
Note that there were no views created in the test database.

I can run queries on the tables by explicitly typing the table name in the select statements.  The data is there and the query results display as expected.

I am running MySQL 5.0.67-community-nt.
Visual Studio and MySql are both local on my development box.
MySql Administrator shows 2 tables and 0 views, as expected.

How to repeat:
Start Visual Studio 2005.
Open Server Explorer panel, Data Connections.
Connect to the MySql server.
Under Data Connections, observe that the Tables icon shows no tables.
Under the Views-null icons, observe that all of the columns for all of the tables are listed.

Suggested fix:
unknown
[10 Nov 2008 0:17] Glenn Robnett
Visual Studio Screenshot of problem

Attachment: Bug40600.png (image/png, text), 245.17 KiB.

[10 Nov 2008 10:03] Tonci Grgin
Hi Glenn and thanks for your report. Verified just as described using latest c/ODBC snapshot.

Now, I am unable to produce DM trace so my guess would be that this problem is some internal mumbo-jumbo of VisualStudio...
Please use c/NET for now as we have more problems reported against .NET framework data provider for ODBC.
[17 Nov 2008 14:32] MySQL Verification Team
VS2005 on Vista Ultimate 64-bit

Attachment: vs2005-dbexplorer.png (image/png, text), 149.25 KiB.

[17 Nov 2008 14:34] MySQL Verification Team
I couldn't repeat on Vista Ultimate 64-bit. Attached picture.
[13 Jan 2009 3:59] Paul Thomsen
Same issue with VS2008 running on Vista 64
[13 Jan 2009 9:17] Tonci Grgin
Miguel, as you can't repeat and I was able to do so immediately, I presume some weird "hot-fixes" combination does this... Ideas?
[13 Jan 2009 9:25] Tonci Grgin
Same error

Attachment: Bug40600.jpg (image/jpeg, text), 12.54 KiB.

[13 Jan 2009 9:26] Tonci Grgin
Same is observed on W2K8 x64 server (see picture above).

Server version: 5.1.30-community-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test;
Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| bug41995       |
+----------------+
1 row in set (0.00 sec)
[13 Jan 2009 10:07] Tonci Grgin
I guess it's related to Bug#39957. Attaching trace with minimal set of options checked. In VS2005 clicked connection to open it (see picture above) and then "Tables" and "Views".

Trying to "Use catalog name..." and similar options produces error:
devenv          18b0-a38	EXIT  SQLTablesW  with return code -1 (SQL_ERROR)
		HSTMT               00ACE370
		WCHAR *             0x04B5FF2C [       4] "test"
		SWORD                        4 
		WCHAR *             0x00000000 
		SWORD                        0 
		WCHAR *             0x00000000 
		SWORD                        0 
		WCHAR *             0x04B60A3C [      18] "TABLE,SYSTEM TABLE"
		SWORD                       18 

		DIAG [HY000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.30-community-log]Table 'test.schemata' doesn't exist (1146)
[13 Jan 2009 10:08] Tonci Grgin
Trace file for c/ODBC 32bit on W2k8x64

Attachment: SQL-no-options.zip (application/zip, text), 9.35 KiB.

[11 Mar 2009 12:46] german barbosa
Have same error.
runing MySql 5.1.3 and ODBC driver 5.1
Visual Studio 2008 Professional Edition Version 9.0.30729.1 SP
[30 Aug 2009 16:50] stephan kortleven
Same problem using :
- windows vista ultimate x64 service pack 2
- visual studio 2008 V9.0.30729.1 SP
- myODBC 5.01.05.00
Unable to connect in server explorer from visual studio when setting ODBC connection with %SystemRoot%\system32\odbcad32.exe 
Solved this by creating ODBC Connection with C:\Windows\SysWOW64\odbcad32.exe
Still no tables are visable in server explorer
Is there allready any fix available ?
[31 Aug 2009 6:47] Tonci Grgin
Lawrin, I'm assigning you to check on this and confirm (or not) that it's related to Bug#39957 (which is fixed but not released yet).
[31 Aug 2009 12:06] Lawrenty Novitsky
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html