Should I put NULL in the database fields where I want NA to be?
I am using an Access DB, VBscript on an ASP page, my code is:
Code:
<%
Set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=e:\inetpub\clients\fpdb\database.mdb"
conn.Open DSNtemp
SQLstmt = "select * from database ORDER BY vehicleprice "
Set rs = conn.Execute(SQLstmt)
DO WHILE NOT rs.EOF
Recid = rs("ID")
vehicleprice = rs("vehicleprice")
%>
<font face="Arial" style="font-size: 9pt">$<%=vehicleprice%>.00</font><br>
<%
rs.MoveNext
LOOP
RS.Close
Response.Write "</TABLE>"
conn.Close
Set conn = nothing
Set SQLstmt = nothing
%>
My results with my current data come out as:
$.00
$.00
$.00
$1000.00
$1500.00
$2000.00
$2200.00
$2500.00
$2800.00
$2945.00
$2950.00
$3500.00
$3500.00
$3500.00
$3500.00
$3500.00
$3995.00
$4500.00
$10900.00
It's now sorting properly but I need the first 3, which are empty in the database to show as NA on the webpage.
Thanks for your help.
Bookmarks