Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot create datasource, "Column 'TABLE_CAT' does not belong to table Tables

I am trying to add a datasource to my visual studio project, however it always gives me an error:

Column 'TABLE_CAT' does not belong to table Tables.

I get the same error in both vs2005 and vs2010. From what I have read, this error is caused by ODBC drivers that are not ODBC 3.0 compliant, however according to Sybase, the driver I have is odbc3.0 compatible. (I have version 10.10.00.28).

As a side note, I can query the database fine. I just can not create a data source.

Here is an image of the error: this is my error

Thanks for your help.

EDIT:

Here are the steps I took:

  • 1) Install Advantage ODBC Driver: (Both my computer and the server I am accessing are 64-bit)
  • 2) Set up my ODBC Connection in Data Sources (ODBC)
  • 3) In VS, Data Sources (on the left) -> Add New Data Source
  • 4) Click "Database"
  • 5) Click "DataSet"
  • 6) Choose ODBC DataSource, choose 'myODBC', supply my login
  • 7) Press 'Test Connection' -> It succeeds
  • 8) Press Okay. Then I get the error.

I have also tried the 32-bit driver, the .Net Data Provider, and trying to 'Connect To Database' instead of adding a data source in VS. All give me the same error. However, I can query just fine, and if I use the connection string in a C# app, it works fine.

like image 484
PRNDL Development Studios Avatar asked Nov 13 '22 05:11

PRNDL Development Studios


1 Answers

The problem that you are experiencing is in the ODBC driver that you are using. Visual Studio 2005 connects to ODBC data sources that support the ODBC 3.0 api and in particular implement the SQLInfo methods. Your manifestations in your problem report indicate that your driver is either downlevel (i.e. pre 3.0) or that some of the optional ODBC features are not implemented.

ODBC 2.0 backwords compatibility should be provided. Or a way to select ODBC 2.0 should be provided as an alternative to ODBC 3.0 Here are links to a few of the others that have reported this same problem:

  1. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=544499&SiteID=1
  2. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=504729&SiteID=1
  3. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=85821&SiteID=1
  4. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=132156&SiteID=1

Source

like image 189
Diego Avatar answered Dec 22 '22 09:12

Diego