IIS 7.0, Classic ASP and Access 2007.

I’m having too much fun thinking of the old days of Classic ASP.  Here is an example of using a Classic ASP page along with IIS 7.0 and Access 2007.  PS: The example shows how to get it working, it’s not meant to be production ready, you should add error coding to block sql injection attacks and other ‘bad’ things that can happen. 

Here is the sample code.
Download here

‘ create conn as adodb.connection and open it
dim strconn
dim conn
dim rs

strconn = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” & Server.MapPath(“App_Dataauthors.accdb”)
set conn = server.createobject(“adodb.connection”)
conn.open strconn
sql = “select * from Authors”
set rs = conn.execute(sql)

<table border=”1″>
do while not rs.eof
    response.write “<tr><td><b>” & rs(“Field1”) & “</td><td>” & rs(“Field2”) & “<td></tr>”

Set conn = nothing
set rs = nothing


One thought on “IIS 7.0, Classic ASP and Access 2007.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: