tvdij
07-05-2006, 08:09 PM
Hey all,
I'm creating a listing for writing the contents of a database to a webpage, however, when the data is displayed on the webpage it isn't in the correct font (the font I've specified). I've tried style sheets and plain old html tags to change the font accordingly but they don't seem to work.
Below is the ASP code
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsProjectList 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("CopyofProjectList.mdb")
'Create an ADO recordset object
Set rsProjectList = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblProjects.Title, tblProjects.CPMOActivity FROM tblProjects;"
'Open the recordset with the SQL query
rsProjectList.Open strSQL, adoCon
Dim FormNum
FormNum = 0
Do while not rsProjectList.EOF
If rsProjectList("CPMOActivity")="True" Then
Response.Write("<tr vAlign='top'>")
Response.Write("<td align='left' width='5%' class=body>")
Response.Write("<font face='Verdana,Arial,Helvetica,Geneva' color='black' size='2'>")
Response.Write(rsProjectList("Title"))
Response.Write("</td>")
Response.Write("</tr>")
FormNum = FormNum + 1
End If
'Move to the next record in the recordset
rsProjectList.MoveNext
Loop
'Reset server objects
rsProjectList.Close
Set rsProjectList = Nothing
Set adoCon = Nothing
%>
The line in BOLD contains the text that won't change (font). How can I change it?
I'm creating a listing for writing the contents of a database to a webpage, however, when the data is displayed on the webpage it isn't in the correct font (the font I've specified). I've tried style sheets and plain old html tags to change the font accordingly but they don't seem to work.
Below is the ASP code
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsProjectList 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("CopyofProjectList.mdb")
'Create an ADO recordset object
Set rsProjectList = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblProjects.Title, tblProjects.CPMOActivity FROM tblProjects;"
'Open the recordset with the SQL query
rsProjectList.Open strSQL, adoCon
Dim FormNum
FormNum = 0
Do while not rsProjectList.EOF
If rsProjectList("CPMOActivity")="True" Then
Response.Write("<tr vAlign='top'>")
Response.Write("<td align='left' width='5%' class=body>")
Response.Write("<font face='Verdana,Arial,Helvetica,Geneva' color='black' size='2'>")
Response.Write(rsProjectList("Title"))
Response.Write("</td>")
Response.Write("</tr>")
FormNum = FormNum + 1
End If
'Move to the next record in the recordset
rsProjectList.MoveNext
Loop
'Reset server objects
rsProjectList.Close
Set rsProjectList = Nothing
Set adoCon = Nothing
%>
The line in BOLD contains the text that won't change (font). How can I change it?