<% Sub generateTable Dim conDB, rst, strSQL, dbname, cnpath Set conDB = server.CreateObject("ADODB.connection") Set rst = server.CreateObject("ADODB.Recordset") dbname = "admin/faq.mdb" cnpath = "DBQ=" & server.mappath(dbname) conDB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " &cnpath strSQL = "SELECT * FROM tblFaq" '********************************************************** 'display contents of recordset '********************************************************** rst.open strSQL,conDB,1 if rst.eof and rst.bof then rst.close conDB.close set rst=nothing set conDB=nothing response.redirect "nofaq.htm" else while not rst.EOF response.write ""&rst("date")& " - " response.write rst("question")& " " response.write ""&rst("answer")& "

" rst.movenext wend end if rst.close conDB.close set rst=nothing set conDB=nothing end sub %> Bassek

Vrae / FAQs

<% Call generateTable %>