<% '---------------- 'View Data Code Dim rs Dim dbconn Dim fsoObject ' FileSystemObject Dim filObject '-- Const ForAppending = 8 '-- Const TristateTrue = -1 set dbconn = server.createobject("ADODB.Connection") set fsoObject = Server.CreateObject("Scripting.FileSystemObject") dbconn.open "DSN=tect" SQL = "Select * FROM sanction WHERE section = 'PresidentsMessage' ORDER BY date DESC" set rs = dbconn.execute(SQL) '---------------- %> Toronto Elementary Catholic Teachers | www.tect.org | <% =rs("title")%>
 
<% Response.Write ("

") Response.Write ("") Response.Write rs.Fields("title") Response.Write ("") Response.Write ("

") Response.Write ("

") Response.Write rs.Fields("date") Response.Write ("

") %> <% '-- this code reads from a txt file with the path stored in the database set filObject = fsoObject.OpenTextFile(rs.Fields("body"), 1, False) Response.Write ("") counter=0 do while not filObject.AtEndOfStream counter=counter+1 thisline=filObject.readline response.write thisline & "
" loop Response.Write ("
") filObject.Close set filObject=nothing set fsoObject=nothing %>

Home | infotect | Resource Canter | Metro Voice | Event Calendar | Sub Units | Site Map | Search | Contact


copyright©2003 Toronto Elementary Catholic Teachers