<%@ import namespace="system.data.oleDb" %> |
|
<Script runat="server"> |
|
Sub page_load |
|
Dim dbconn as oledbConnection |
Dim dbCMD as oleDbCommand |
Dim dtr as oledbdatareader |
|
' Server.MapPath("[relative path to your database]") |
dbConn = New oledbConnection ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" & server.MapPath("/test.mdb")) |
dbConn.open() |
dbCMD = new oleDbCommand ("select * from tblContact",dbconn) |
dtr = dbCMD.executereader() |
|
While dtr.read() |
response.write ("<li>") |
response.write (dtr(0) & "---" & dtr(1)) |
End while |
|
dtr.close() |
dbConn.close() |
|
End Sub |
|
</Script> |
Article ID: 173, Created: July 25, 2012 at 12:44 AM, Modified: July 25, 2012 at 12:44 AM