|
|
KB100013: How to create a secure, stable server-side data access component for a Microsoft Access da |
|
|
1.4 |
|
|
Stephan Bren |
|
|
FREE |
|
|
.NET, ASP.NET |
|
|
ASP.NET / Components |
|
|
Click to Visit |
|
|
41 |
|
When developing your web-based application, you'll most likely move application data access (and business) logic into compiled components. If your data access involves file-based databases, such as Microsoft Access, you'll need to employ the Server.MapPath method in order to build the proper connection string to the MDB file for your OleDbConnection object. The Server object is intrinsic to the ASPX page object, and thus Server object methods are available if you build your data access code in the ASPX page itself. However, this is not the case if you build data access in the page's Code Behind module or in a separate component. In these cases, you'll need to instantiate an instance of the Server object, or use the fully qualified path of the Server object's MapPath method. Both of these approaches are covered here.
|