How do find a empty field/value/records?

R

rahman

I know it should be very easy but I am new in ASP so I could not
figured out.
Here is the simplified version of my code:

thePaymentID= request.querystring("IDValue")

SQLqueryPayment= "SELECT sum(paid) as paid, sum(Interest) as interest
FROM payment WHERE payment_ID =" & thePaymentID & ""

dim rstempPayment
set conntemp=server.createobject("adodb.connection")
conntemp.Open "DSN=payment"

set rstempPayment=conntemp.execute(SQLqueryPayment)


fldValPaid = rstempOwner.Fields("paid").Value
------------------------------------------------------------------------
I need to find out if "fldValPaid" hold anything. I will use it an
IF ELSE statement. In payment table a particular record could exist or
not. How do I find out by evaluating "fldValPaid" if any record
exists or not. I have to find out using "fldValPaid" ...I can not
use number of record/record return or any other method.

I hope you understand my question.
Thanks,
-Rahman
 
S

S. Justin Gengo

Rahman,

If Not fldValPaid Is DbNull.Value Then
'---A value was returned
End If

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top