Showing posts with label ConnectionString. Show all posts
Showing posts with label ConnectionString. Show all posts

Tuesday, March 8, 2011

Referring to Connection String in Web.Config

When instantiating the SqlConnection object:


MyConnString = ConfigurationManager.ConnectionStrings("TheConnectionString").ConnectionString


Where "TheConnectionString" is the name of the connection string in Web.Config.


"SqlConnection Class (System.Data.SqlClient)" ( http://bit.ly/J5ew4y )

Monday, December 6, 2010

ACCESS Database & the Bin/Debug folder

Your connection string should look like this to link your app with a DB that is placed within the Bin/Debug folder: (Access example)

Private Const _strCONNECTIONSTRING As String = "Provider=Microsoft.Ace.OLEDB.12.0;" & _
        "Data Source=DatabaseName.accdb"