Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to make a webpage that will access an MS Access Database (.mdb) make a search and display some results in the webpage. I try with asp and php. Is there any easiest way of doing it?

ASP makes it very easy to pull information from an Access database. Here is an example of how to do it.
^^^^^^^^^^^^^^^^^^^^^^^^^
[HTML]
[HEAD]
[TITLE]Student Records[/TITLE]
[/HEAD]
[BODY]
[%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" +
"C:\Databases\Students.mdb")
Dim RS
Set RS = Server.CreateObject ("ADODB.Recordset")
RS.Open "SELECT * FROM Students", DB
If RS.EOF And RS.BOF Then
Response.Write "There are 0 records."
Else
RS.MoveFirst
While Not RS.EOF
Response.Write RS.Fields ("FirstName")
Response.Write RS.Fields ("LastName")
Response.Write "[HR]"
RS.MoveNext
Wend
End If
%]
[/BODY]
[/HTML];^^^^^^^^^^^^^^^^^^^^^^^^
*Note: You'll need to replace the ] and [ symbols with less than and greater than signs*
This gives you an example on how to read info from an Access database. There are lots of books and ebooks out there that will give you an in depth look. I have a couple, and if you want I can email them to you.hth

![]() |
Fetching Unread mails usi...
|
question in C++ on ignori...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |