View Full Version : Access Database (mdb) to Asp page?

09-15-2006, 02:56 PM
Hi there,

I've been tasked with making a newsletter from an access database that is automatically compiled every month.

Now the data is very logical - ID - Article Title - Date - Article Content etc

So I figure if there was a way to dynamically include the data into an asp webpage, I'd save myself about a week's worth of work every month!

Can I ask - is it possible to directly access a mdb database from an asp webpage - it's on the company intranet, so the database file will need to be online.

I've read a few tutorials - but they always seem to start talking about OBDC options in control panel and saving the database locally - which unfortunately isn't an option.

If you could provide any input/suggestions/plans I'd be most appreciative - as I've already said, some input from a clever bod, could potentially save me hours and hours of mind-numbing work! ;)

Thanks very much

09-19-2006, 04:41 AM
Yes you can do this job using ASP without much trouble as far as i think.

Originally posted by: divtag33

Can I ask - is it possible to directly access a mdb database from an asp webpage - it's on the company intranet, so the database file will need to be online.

Yes it is possible to access databases using ASP. If your web server can access your company intranet it can access the database and perform the retrieval operation.

To perform a database access you doesn't need a DSN all the time there is a DSN Less connection too using which you can perform the job or try to do it using OLE DB

You can find more details about OLE DB here http://www.drdev.net/article09.htm

You can refer web for getting some good idea about developing the system for example check the following out:


09-21-2006, 11:14 AM
brilliant - cheers!

10-03-2006, 11:33 PM
this could save you some screwing around... here's the code i use to connect my asp pages to access db's. change where appropriate. you'll need the adovbs.inc file (can be found in C:\Program Files\Common Files\System\ado on win xp) to be included. these locktype's will allow you to update the db as well,. change to suit the application.

more info on ado here: http://www.w3schools.com/ado/default.asp

<!-- #include file="adovbs.inc" -->
Dim connect, rs, rs2, rs3

Set connect_db = server.CreateObject("ADODB.Connection") 'connect to main db
connect_db.Open Server.MapPath("---your db path---")
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * from rs1", connect, adOpenStatic, adLockOptimistic
Set rs2= Server.CreateObject("ADODB.Recordset")
news.Open "Select * from rs2", connect, adOpenStatic, adLockOptimistic
Set rs3= Server.CreateObject("ADODB.Recordset")
admin.Open "Select * from rs3", connect, adOpenStatic, adLockOptimistic

10-16-2006, 09:42 PM
You could cheat a bit and use ASP Maker (http://www.hkvstore.com/aspmaker/).

It's saved me hours of coding when I need a quick and easy way of web enabling a database.

I'm not linked to them in any way. Just a satisfied customer.

10-17-2006, 09:40 AM
Instead you can go for a good ASP IDE that is suitable for everything possible from ASP