Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VS Express 2013 - System.Data.Odbc not supported

Status
Not open for further replies.

pmegan

Programmer
Aug 29, 2005
1,186
US
Hi,

Does anyone know how to register the ODBC data provider for VS Express 2013? I've got some old applications written in VB.Net 2.5 that have to be upgraded, and whenever I try to configure the ODBC connection I get an error saying that he system.data.odbc provider is not supported.
 
Thanks for the quick reply. Unfortunately that link doesn't help much. I'm not trying to use an ODBC connection string with an OleDB connection, just trying to create an ODBC connection from the VS GUI.

Here are the problems I'm having:

When I'm in the connection string properties for an ODBC connection that's been dropped onto a form, click "new connection" gives me a pop-up saying "The data provider system.data.odbc is not supported"

When I go to Data Sources to create a new source, the only data source types that are available are MS Access, MS SQL Server, MS SQL Server Database File, and Other. Selecting "other" only gives me SQL Server and OLEDB as options for the data provider.

I can add, configure and open/close an ODBC connection at run time, (below), but can't do it in the GUI. I'm trying to add new fields to the DataSets and DataGridViews, so being able to connect programmatically doesn't help in this case.

Code:
' this works fine
Dim O As New System.Data.Odbc.OdbcConnection

O.ConnectionString = "Dsn=Micros;uid=custom;pwd=custom"

O.Open()
O.Close()
 
Someone else may have had a similar issue. Two places that I check for this are Visual Studio Gallery to see if there is a VS extension (or AddIn) that does this and CodeProject to see if anyone has written an article to solve the problem. 80% of the time I have found a solution.
 
Sorry I've just noticed that you are using VS Express 2013. That won't accept AddIns and /or extensions.

However VS2013 Community and VS2015 Community are both free and are equivalent to a slightly reduced version of VS 2013/2015 Pro. They both accept extensions (although some extensions are only available for Pro and above). 2013 Community has a lot more extensions available in the Gallery than 2015.

In this situation I would check the Gallery (search Visual Studio Gallery Online) to see if something has already been done and if so download and intall one of the Community editions.

The Pro and above versions have to have something to encourage us to buy them, so each higher version has more features. The free versions therefore have reduced functionality, but are still eminently usable.
 
Thanks for all the help. I'll try to upgrade to 2013 Community when I have time. This was kind of a low priority project that I wanted to get done during a few slow days and hadn't expected problems like this.
 
Using Community 2013 you can create an ODBC data connection using the Server Explorer window (select Microsoft ODBC Data Source) which is generic and allows to refer to a precreated one.

The reason that it works in code and not through the UI is as I said earlier. You get the .Net libraries in Express but not all are available through the UI, but are in code. Community and above provides them through the UI as well.

Presumably if you decide to remain with Express, you could create a UserControl in which you provide the necessary resources. I've never used Express so I'm not sure but I think you can add your own user controls - then just add it to your ToolBox to use as and when required.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top