mrstuff68
May 31st, 2002, 11:41 PM
I have the following code on my asp page. What happens is that data is retrieved from a DB and put in a table, what i would like to know is how can i get the Quote colmn to be about 350pixles and the Author about 150pixles.
<%
Option Explicit
Response.Expires = -1000
Dim oConn
Dim oRS
Dim sSQL
Dim sColor
Dim myDate
Dim nDate
mydate = Date()
nDate = Month(myDate) & "/" & Day(myDate)
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\Quotes.mdb"))
sSQL = "SELECT Date, TodaysQuote, Author FROM Quotes WHERE Date = '" & nDate & "'"
Set oRS = oConn.Execute(sSQL)
Response.Write("<table border=1 cellpadding=1 cellspacing=1 style='font-family:arial; font-size:10pt;'>")
Response.Write("<tr bgcolor=black style='color:white;'></tr>")
sColor = "white"
Do While NOT oRS.EOF
If sColor = "silver" Then
sColor = "white"
Else
sColor = "silver"
End If
Response.Write("<tr bgcolor='" & sColor & "'>")
Response.Write("<td>" & oRS("TodaysQuote").Value & "</td>")
Response.Write("<td align=left>" & oRS("Author").Value & "</td></tr>")
oRS.MoveNext
Loop
Response.Write("</table><br><br>")
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
%>
<%
Option Explicit
Response.Expires = -1000
Dim oConn
Dim oRS
Dim sSQL
Dim sColor
Dim myDate
Dim nDate
mydate = Date()
nDate = Month(myDate) & "/" & Day(myDate)
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\Quotes.mdb"))
sSQL = "SELECT Date, TodaysQuote, Author FROM Quotes WHERE Date = '" & nDate & "'"
Set oRS = oConn.Execute(sSQL)
Response.Write("<table border=1 cellpadding=1 cellspacing=1 style='font-family:arial; font-size:10pt;'>")
Response.Write("<tr bgcolor=black style='color:white;'></tr>")
sColor = "white"
Do While NOT oRS.EOF
If sColor = "silver" Then
sColor = "white"
Else
sColor = "silver"
End If
Response.Write("<tr bgcolor='" & sColor & "'>")
Response.Write("<td>" & oRS("TodaysQuote").Value & "</td>")
Response.Write("<td align=left>" & oRS("Author").Value & "</td></tr>")
oRS.MoveNext
Loop
Response.Write("</table><br><br>")
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
%>