<add name="NORTHWNDConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
Above is my cnn string that is not working, it might be du to that m using SQLserver standard version .........
Do I have to change the cnn string.?
<
addname="SiteSqlServer"connectionString="Server=yourServerName_OR_IP;Database=yourDBname;uid=yourusername;pwd=yourpassword;"providerName="System.Data.SqlClient" />|||hooligannes97:
<
addname="SiteSqlServer"connectionString="Server=yourServerName_OR_IP;Database=yourDBname;uid=yourusername;pwd=yourpassword;"providerName="System.Data.SqlClient" />
You provided the cnn string if our DB is in SQL Server, I guess.
But I've placed my db file(.mdf) in 'App_Data' folder. I want cnn string for this...
How can I point to this DB (in App_Data folder)......
|||Hi,
If you're using the standard edition of SQL Server, you have to attach your .mdf file to the SQL Server serivce and write the connection string like hooligannes97 provided.
HTH.
No comments:
Post a Comment