Creating Access Database Connection String
This tutorial contains a better and clean ASP code to create a sample connection string to an Access database. You may use this sample code in your applications.
First we must modify local id value to display custom date time format.
<%
session.lcid = 2057
%>
session.lcid = 2057
%>
For more information on LOCAL ID values visit this article. We have used british value. Now we will examine and create a custom database string by one by.
<%
1. Const strConPathFolderDb = "databases/"
2. Const strConDatabaseSt = "activeNews"
3. strConMapPath = Server.MapPath(strConPathFolderDb & strConDatabaseSt & ".mdb")
4. strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strConMapPath
%>
1. Const strConPathFolderDb = "databases/"
2. Const strConDatabaseSt = "activeNews"
3. strConMapPath = Server.MapPath(strConPathFolderDb & strConDatabaseSt & ".mdb")
4. strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strConMapPath
%>
1. First we are modifying which folder we will use.
2. Our database name
3. This joins database folder and database name in one string
4. Now strConnectionString variable is your connection string.
Very simple and clean coding.
Have a nice coding !
Our free applications:
Custom Search
- ASP Chat Box
- Working with Array Remove An Item
- ASPNET Web Counter Free Open Source Code
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Delete Files Online in ASP
- Video Interview With Roman Strobl
- Custom Paging in ASP Fast And Easy
- Displaying Records From An Excel Database
- Paging Results in PHP
- How to write and use a JavaBean My frst java bean
- Installing Sun Java System Application Server 9.1 in Solaris Zones
- Java SE 6 Performance White Paper
- Converting sceonds to hours minutes and seconds
- Encoding URL strings
- Easy Download Manager Free Version
- ASP Chat Box
- Writing Form Data to Text Files
- Paging Records in JSP
- What is Ecommerce and the Importance of Ecommerce
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Simple XML RSS Parser
- Counting records in PHP mySQL
- ActiveNews Manager Freeware News Exchange Software
- How to write and use a JavaBean My frst java bean
- Paging Results in PHP
- Free User Registration Form
- A-timesaver-control-GridView
- ASPNET Web Counter Free Open Source Code
- Easy Download Manager Free Version
- ASP Chat Box
- Writing Form Data to Text Files
- Paging Records in JSP
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Simple XML RSS Parser
- ActiveNews Manager Freeware News Exchange Software
- Counting records in PHP mySQL
- How to write and use a JavaBean My frst java bean
- Paging Results in PHP
- Free User Registration Form
- A-timesaver-control-GridView
- ASPNET Web Counter Free Open Source Code
- Comparing Dates