<% On Error Resume Next Set objConn = Server.CreateObject("ADODB.Connection") pseudoDSN = "DRIVER={Microsoft Access Driver (*.mdb)};" pseudoDSN = pseudoDSN & "DBQ=" & server.mappath("db/blog.mdb") objConn.open pseudoDSN 'CheckForErrors(objConn) Query = "SELECT * FROM community ORDER BY date DESC" Set objRec = Server.CreateObject("ADODB.Recordset") objRec.Open Query, objConn, adLockOptimistic %> the amazing Pilots
 
LATEST DIARY ENTRY

<% Dim counter counter = 0 Dim currTotal currTotal = objRec.RecordCount 'response.write(currTotal) 'UNCOMMENT TO PRINT RECORD COUNT numToDisplay = 1 if numToDisplay > currTotal then numToDisplay = currTotal end if If currTotal > 0 then do until counter >= numToDisplay %> <%=objRec("title")%>
<%=objRec("content")%> read more... <% counter = counter + 1 If counter > currTotal then counter = currTotal end If objRec.MoveNext Loop Else %>

No entries at present, sorry.

<% End If objRec.Close Set objRec = Nothing objConn.Close Set objConn = Nothing %>

JOIN OUR MAILING LIST

Name

Email

Country



© 2005 the amazing Pilots   Contact   Top of Page