Hello Friends
I came across with an error when I was trying to connect to
SQL Database by using Microsoft.Practices.EnterpriseLibrary.Data
It throws below error every time.
“The requested
database <databasename> does not have provider name set in the connection
string."
Old Connection string:
<connectionStrings>
<add
connectionString="Server=servername;Database=dbname;User ID=userid;Password=password" name="MyConnectionstring" />
</connectionStrings>
Changed Connection String Add the
Provider name:
<connectionStrings>
<add
connectionString="Server=servername;Database=dbname;User ID=userid;Password=password" name="MyConnectionstring"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
No comments:
Post a Comment