cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Studio 2015 Web connect to SQL Anywhere 16

Former Member
0 Kudos

I cannot establish a connection from VS 2015 express for Web to SQL Anywhere 16. I can get to SA16 from PowerBuilder and from isql. I have connected by following this article that connects and allows you to run a select statement and it works.

Hodentek: Connecting to SQL Anywhere 16 using Visual Studio 2013 RC for Web.

I cannot get Visual Studio to see Sybase as a provider to connect to. All I see is SQL Server. I have followed the wiki: Using SQL Anywere and the ADO.NET Entity Framework, got no errors running the SetupVSPackage.exe command but I do not see the SQL Anywere as a database connection.

I've been searching and have not found a solution. My customer has been on Sybase for years so I cannot switch to SQL Server. But I need to be able to create some new application(s) with Visual Studio so I need this to work.

Thanks for any suggestions.

Larry Cermak

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Did you add a Reference for SQL Anywher .NET Data Provider?

i.e. following is a screen captured from VS 2013..

From Solution Explorer, if you expand your project name.. and then expand References..

do you see iAnywhere.Data.SQLAnywhere.v#.# ?

Once you have added a Reference and include iAnywhere library in your source, then you should

have no problem using our .NET API...

Former Member
0 Kudos

That the problem, it does not show up in the list. I've run the SetUpVSPackage.exe successfully but it still does not show up.

Former Member
0 Kudos

If you don't see it in the list... then that most likely means you have not added a Reference..

So right click on References icon and click "Add Reference"...

From Reference Manager.. click Extension.. then do you see iAnywhere.Data.SQLAnywher for .NET #.# ?

Former Member
0 Kudos

Thank you getting closer. I see it now, select it and it is in the reference list. Now when I add an entity and select that it is asking for a connection. I click on new connection and the only options are SQL Server, SQL Server Database File, and Other. I would expect somewhere to see IAnywhere/SQL Anywhere in the list but it's not there.

Former Member
0 Kudos

I also made sure to select both SQL Anywhere 16 providers.

Former Member
0 Kudos

So I see that you want to use SQL Anywhere for your Entity Framework project..

Check this post on how to use EF 6 for SQL Anywhere 16.

Former Member
0 Kudos

I will check it out thanks. I want to establish a connect to the database so I can create objects, such as LINQ, and create an application. Once I can establish the connection it will be simplier.

Former Member
0 Kudos

No matter what I try I create a connection to ASA16. I want to do that so I can create LINQ, dataviews, ect. I never see Sybase when I select Other for a new database connection, all I see is SQL Server.

Former Member
0 Kudos

I was able to create a new datasource over the weekend to connect to the ASA16 database. The problem is that it uses the ASA12 source. Obviously I have both  on my machine. Since I installed ASA16 and ran the setup for VS why wouldn't ASA16 show up in the list?

Former Member
0 Kudos

Hi Larry,

Wasn't it .NET SQL Anywhere data provider that you wanted to use?

But you have selected OLE DB Provider instead.

So, I would suggest if you want to use SQL Anywhere 16 .NET Data provider instead OLE DB Provider, re-run setupvspackage using SQL Anywhere 16 Assembly..

i.e.Update c:\Program Files\SQL Anywhere 16\Assembly\v4\SetupVSPackage /i /v 6

from command line

and change the Data source from .NET Framework Data Provider for OLE DB to

.NET Framework Data Provider for SQL Anywhere 16.

Note that I have SQL Anywhere 12 selected, but once you re-run SetUpVSPacakge, you should see the 16 .NET Framework...

Hope this works.