%@ Language=VBScript %> <%Option Explicit%>
The AEWC Center at The University of Maine
The Advanced Engineered Wood Composites Center
The Advanced Structures and Composites Laboratory
|
| Links to Contracting Information |
<% 'list of publications Dim spew, SQLtext, list, pagesize, pagenum, maxpages, reccount, i 'number of records displayed on a page pagesize = 30 'retrieve the page number we're on If Request.QueryString("pgn") <> "" then pagenum = cInt(Request.QueryString("pgn")) Else pagenum = 1 End If 'open the database Dim DataConn, objRS set DataConn = Server.CreateObject("ADODB.Connection") DataConn.ConnectionString = Application("aewcdb_ConnectionString") DataConn.Open , Application("aewcdb_RuntimeUserName"), Application("aewcdb_RuntimePassword") set objRS = Server.CreateObject("ADODB.Recordset") 'objRS.CursorLocation = 3 'aduseclient 'objRS.CacheSize = 5 SQLtext = "SELECT tblpublications.Title, tblpublications.Publisher, tblpublications.Authors, tblpublications.Year " SQLtext = SQLtext & "FROM tblpublications " SQLtext = SQLtext & "ORDER BY tblpublications.Authors, tblpublications.Year;" objRS.Open SQLtext, DataConn, 1, 1 'adOpenKeyset, adLockReadOnly 'establish paging parameters objRS.MoveFirst objRS.PageSize = pagesize maxpages = cint(objRS.PageCount) objRS.AbsolutePage = pagenum 'display paging information spew = spew & "
Page number " & pagenum & " of " & maxpages & " total pages.
"
If pagenum <> 1 then
spew = spew & "[previous] " & vbcrlf
End if
If pagenum <> maxpages then
spew = spew & "[next] " & vbcrlf
End If
For i = 1 to maxpages
spew = spew & "" & i & " " & vbcrlf
next
spew = spew & ""
'print out a listing
reccount = 0
Do until objRS.EOF OR reccount >= pagesize
spew = spew & "
" spew = spew & objRS.Fields("Authors") & " " spew = spew & objRS.Fields("year") & ". " spew = spew & objRS.Fields("title") & " " spew = spew & objRS.Fields("publisher") spew = spew & "
" & vbcrlf objRS.MoveNext reccount = reccount + 1 Loop 'display paging information spew = spew & "Page number " & pagenum & " of " & maxpages & " total pages.
"
If pagenum <> 1 then
spew = spew & "[previous] " & vbcrlf
End if
If pagenum <> maxpages then
spew = spew & "[next] " & vbcrlf
End If
For i = 1 to maxpages
spew = spew & "" & i & " " & vbcrlf
next
spew = spew & "
" 'close the database objRS.Close set objRS = nothing DataConn.Close set DataConn = nothing Response.Write spew %>
A Center for Research, Education, and Economic Development at the University of Maine
| © Copyright 2004 by the Advanced Engineered Wood Composites Center, University of Maine, Orono, ME 04469. For questions about the Center, our capabilities, and composite products, please contact us |
An ISO 17025 Certified Research & Development Laboratory Accredited by International Accreditation Service Click here for a list of accredited ASTM Tests Offered by AEWC (PDF) |