%@LANGUAGE="VBSCRIPT"%>
<%
Function Str2ProperCase(sValue)
iPos = 1
Do While InStr(iPos, sValue, " ", 1) <> 0
iSpace = InStr(iPos, sValue, " ", 1)
sTemp = sTemp & UCase(Mid(sValue, iPos, 1))
sTemp = sTemp & LCase(Mid(sValue, iPos + 1, _
iSpace - iPos))
iPos = iSpace + 1
Loop
sTemp = sTemp & UCase(Mid(sValue, iPos, 1))
sTemp = sTemp & LCase(Mid(sValue, iPos + 1))
Str2ProperCase = sTemp
End Function
DIM iRowCount
DIM Con, RS, strSQL
SET Con = Server.CreateObject("ADODB.Connection")
SET RS = Server.CreateObject("ADODB.RecordSet")
Con.Open Application("DBConnectionString")
'strSQL = "SELECT TOP 3 * FROM pr_pr ORDER BY PRdate DESC"
strSQL = "SELECT TOP 5 * FROM pr_pr WHERE path = 'FS' ORDER BY PRdate DESC"
SET RS = Con.Execute(strSQL)
IF RS.EOF THEN
response.write "no data found at this time
"
ELSE
iRowCount = 0
'found data
'this will be added to the flash string
strLink = "News/news_details.asp?ID="
strFlash = ""
WHILE NOT RS.EOF
iRowCount = iRowCount + 1
IF iRowCount = 1 THEN
strFlash = strFlash & "?"
ELSE
strFlash = strFlash & "&"
END IF
strFlash = strFlash & "date" & iRowCount & "=" & RS("PRdate") & "&info" & iRowCount & "=" & server.URLencode(Str2ProperCase(RS("Title"))) & "&link" & iRowCount & "=" & strLink & RS("ID")
'strFlash = strFlash & "date" & iRowCount & "=" & RS("newsDate") & "&info" & iRowCount & "=" & RS("newsHeader") & "&link" & iRowCount & "=" & strLink & RS("newsGUID")
'response.write iRowCount & " : " & RS("newsDate") & " - " & RS("newsHeader") & "
"
'response.write strFlash & "
"
RS.MOVENEXT
WEND
END IF
RS.Close
SET RS = Nothing
Con.Close
Set Con = nothing
%>