CompCobalt
asked on
Don't Load/Show Null or 0 value in recordset
For:
ASP Classic / MS Access Database
This is what I have now when I load the database:
Recordset1.Source = "SELECT * FROM Detail WHERE CardNum='1621706607' AND AdvALREADY_CHRGED='1'"
Now when I run that I get alot of returns in a record named: "AdvAmt" that show up as 0's". I don't want them to show up at all.
I know this is wrong but something like this:
Recordset1.Source = "SELECT * FROM Detail WHERE CardNum='1621706607' AND AdvALREADY_CHRGED='1' AND IF NOT AdvAmt='0' " // Like AdvAmt=!'0' "
Thanks for any help....
ASP Classic / MS Access Database
This is what I have now when I load the database:
Recordset1.Source = "SELECT * FROM Detail WHERE CardNum='1621706607' AND AdvALREADY_CHRGED='1'"
Now when I run that I get alot of returns in a record named: "AdvAmt" that show up as 0's". I don't want them to show up at all.
I know this is wrong but something like this:
Recordset1.Source = "SELECT * FROM Detail WHERE CardNum='1621706607' AND AdvALREADY_CHRGED='1' AND IF NOT AdvAmt='0' " // Like AdvAmt=!'0' "
Thanks for any help....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How on to question number too...
I added:
Recordset1.Source = "SELECT * FROM Detail WHERE CardNum='1621706607' AND AdvALREADY_CHRGED='1' AND AdvAmt<>0"
And it works, now if the page is empty and no records are found. how do i redirect them to a diffrent page ??? Do u want me to open a new question ?
I added:
Recordset1.Source = "SELECT * FROM Detail WHERE CardNum='1621706607' AND AdvALREADY_CHRGED='1' AND AdvAmt<>0"
And it works, now if the page is empty and no records are found. how do i redirect them to a diffrent page ??? Do u want me to open a new question ?
ASKER
Nevermind i got it, here is the code:
<%
If (Recordset1.RecordCount > 0) Then
Response.Write("Record(s) are in the RecordSet")
Else
//Response.Write("RecordSet in empty")
Response.Redirect("norecords.asp")
End If
%>
ASKER
Sorry remove the //Response.Write("RecordSe t in empty")
and change it to 'Response.Write("RecordSet in empty")
It's a comment... :-)
and change it to 'Response.Write("RecordSet
It's a comment... :-)
Okay, glad my original response was helpful. Thanks.
~bp
~bp
ASKER