cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Add SQL AnyWhere connection Visual Studio 2012 Express

Former Member
0 Kudos
10,239

Hello,

I have downloaded and installed SQL AnyWhere 12 Developer edition and also did 'SetupVSPackage.exe' installation. I was able to successfully run 'SimpleViewer' and 'SimpleWin32' samples.

I am using Visual Studio 2012 Express Edition. For my test project, how do I add a connection to the demo database? When I go to add connection in database explorer, I don't see SQL AnyWhere listed in the 'Choose Data Source' window. Please help.

Thanks. - Milind Joshi

Accepted Solutions (0)

Answers (1)

Answers (1)

jeff_albion
Product and Topic Expert
Product and Topic Expert

The way Visual Studio displays the following screen after hitting [Change...]:


Re Add SQL AnyWhere connection Visual Studio 2012 Express


Re Add SQL AnyWhere connection Visual Studio 2012 Express

is based on the DbProviderFactories information pulled out of the machine.config file for your respective framework (e.g. C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Config\\machine.config for .NET 4.0, x64). This looks at the registered <system.data> / <DbProviderFactories> section for available providers:

==============================
<system.data>
    <DbProviderFactories>
        <add name="SQL Anywhere 11 Data Provider" invariant="iAnywhere.Data.SQLAnywhere"
             description=".Net Framework Data Provider for SQL Anywhere 11" 
             type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v4.0, 
               Version=11.0.1.30694, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />
==============================

If you're not seeing the SQL Anywhere .NET Provider in your Visual Studio dialog with the framework and bitness you're expecting when hitting "Change...", check the machine.config information for your targetted framework.

Run the SQL Anywhere .NET installation utility \\Assembly\\V2\\SetupVSPackage.exe or \\Assembly\\v4\\SetupVSPackage.exe to attempt to automatically add the entries in for 2.0/3.x and 4.x .NET frameworks respectively (or manually add the entries), if your framework is missing the required entries.