SBSK and SQL database

Last post 10-13-2009 6:19 AM by Hyacinth Broadchest. 1 replies.

Sort Posts:

  • SBSK and SQL database

    06-05-2009, 9:16 AM
    • Member
      2 point Member
    • newbie495
    • Member since 01-15-2008, 1:23 AM
    • Posts 3
    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!!!
  • Re: SBSK and SQL database

    10-13-2009, 6:19 AM

    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,

     

Page 1 of 1 (2 items)