Principle: Put our database path in Web.config !!!!
Conn.inc in the ASP stores the path to our website database, in the actual method in ASP.NET:
Production Method:
1. Under normal method to build OLECONNECTION data in the control
2. Control OLECONNECTION -> Properties -> DynamicProperties -? Connectionstring -> Check ready
The method used in the future:
Control OleConnection -> Properties -> DynamicProperties -? Connectionstring -> Check ready
====================
The following is a comparison of before the key to web.config
#Region "The code" of the web form designer "
'This call is required for the web form designer. Private Sub InitializeComponent () Dim configurationAppSettings As System.Configuration.AppSettingsReader = New System.Configuration.AppSettingsReader Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection '' OleDbConnection1 'Me.OleDbConnection1.ConnectionString = CType (ConfigurationAppSettings.GetValue ("OLEDBConnection1.connectionstring", gettype (system.string)), string)
End Sub
============================================================================================================================================================================================================= ==========
#Region "The code" of the web form designer "
'This call is required for the web form designer. Private Sub InitializeComponent () Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection '' OleDbConnection1 'Me.OleDbConnection1.ConnectionString = "Jet OLEDB: Global Partial Bulk Ops = 2; Jet OLEDB: REGISTRY PATH =; Jet OLEDB: Database L "& _" OCKING MODE = 1; Jet OLEDB: Database Password =; Data Source = "C: / INETPUB / WWWROOT / WebAP" & _ "Plication1 / Data / Database.mdb" "; PASSWORD =; Jet OLEDB: Engine Type = 5; Jet OLEDB: Global" & _ "Bulk Transactions = 1; Provider =" Microsoft.jet. OleDb.4.0 ""; Jet OLEDB: System DataBas "& _" E =; Jet OLEDB: SFP = false =; mode = share deny none; jet OLEDB: New D "& _" Atabase password =; jet oledb: create system database = false; jet oledb: don't copy lo & _ "Cale on Compact = false; Jet OLEDB: Compact without replica repair = false; user id = adm" & _ "in; jet oledb: encrypt Database = false" End Sub