I'm trying to point to my SQL database for app data. I changed the newsProviderName="sqlProvider". With that, I get the error message: Object reference not set to an instance of an object. In particular the source error reads: Line 22: string connectionStringName
= sec.NewsProviders[sec.NewsProviderName].Parameters["connectionStringName"]; Line 23: return WebConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString; By the way, I have successfully connected on test pages to the SQL database and
VWD added the following connection string to the Web.Config file: I have searched for weeks on how to add a connection string to the SQL database (along with table, username, password) to no avail. Can anyone answer this or point me to a general area I might
find the answer? Any and ALL help would be most appreciated!!!
newbie495
Member
2 Points
3 Posts
SBSK and SQL database
Jun 05, 2009 01:16 PM|LINK
Hyacinth Bro...
Member
64 Points
42 Posts
Re: SBSK and SQL database
Oct 13, 2009 10:19 AM|LINK
I might be misunderstanding the question, but why isn't this the answer?
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
Regards,