Forums

ASP

This topic is locked

How to CONVERT?

Posted 01 Aug 2002 12:38:51
1
has voted
01 Aug 2002 12:38:51 Irakli Garakanidze posted:
There is a big site of a football club with current matches and results which are generated from the database. I need to convert existing (asp with repeated regions) file to simple HTML file....

Is it possible?

when I write something like

Dim newsen
Dim newsen_numRows
Dim FFF
FFF=""

Set newsen = Server.CreateObject("ADODB.Recordset"
newsen.ActiveConnection = MM_dina_STRING
newsen.Source = "SELECT * FROM news ORDER BY ndate DESC"
newsen.CursorType = 0
newsen.CursorLocation = 2
newsen.LockType = 1
newsen.Open()

newsen_numRows = 0

Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
newsen_numRows = newsen_numRows + Repeat1__numRows

FFF=FFF+"<html>"+"<head><title>"+"News_Archive"+"</title></head><body><table width='100%' border='0' cellspacing='3' cellpadding='3'>"

While ((Repeat1__numRows <> 0) AND (NOT newsen.EOF))


FFF = FFF + "<tr><td bgcolor='#0066FF'><font color='#FFFFFF' size='-1' face='Verdana, Arial, Helvetica, sans-serif'>" + (newsen.Fields.Item("ndate".Value)+"</font></td></tr><tr><td><font size='-1' face='Verdana, Arial, Helvetica, sans-serif'>"+(newsen.Fields.Item("dsc".Value)+"</font></td></tr>"

Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
newsen.MoveNext()
Wend

FFF=FFF+"</table></body></html>"

newsen.Close()
Set newsen = Nothing
response.Write(FFF)


Explorer shows me an error

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "<html><head><title>N"]'





Reply to this topic