Link to home
Start Free TrialLog in
Avatar of Michael Kochilla
Michael Kochilla

asked on

Azure connection string for OleDb in Asp.net webconfig

We have an asp.net 4.5 c#  project where we are moving the database from a local connection to Azure. Our main connection string with Azure works fine. Is there a change in formatting that needs to be done in order for our OleDb connection string to connect with our Azure database properly?
Currently in the web config we have the following for the OleDb connection:

connectionString="Provider=SQLNCLI11;Server=Our Server Name;Database=Our Database Name; Trusted_Connection=yes;"

Any ideas and suggestions are welcome.
Thanks for your help!
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

For OleDb connection in Azure, the connectionstring seems pretty much the same:

Provider=SQLNCLI11;Password=myPassword;User ID=[username]@[servername];Initial Catalog=databasename;Data Source=tcp:[servername].database.windows.net;

Open in new window


But do note the comment:

Microsoft does not announce support for OLE DB connections to Azure and there are limitations. Some required OLE DB schema rowsets are not available from an Azure connection, and some properties that identify features in SQL Server are not adjusted to represent SQL Azure limitations. For most common connect/query/update tasks it seems to work fine. 

https://www.connectionstrings.com/sql-server-native-client-11-0-oledb-provider/

hence, you may consider to use other providers instead.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.