retrieving the value of a database field - ?

G

Guest

I'm attempting to write ASP code to retrieve the value of a field returned
from a database, and then (if the value equals ZERO, either by being a zero
or being a null value), I want to assign a ZERO value to a variable.

Can anyone help me to this? I just can't figure out how to use a value
statement to retrieve the value of a database field.

Help?
 
S

Stefan B Rusynko

See http://www.w3schools.com/ado/default.asp and http://www.w3schools.com/asp/default.asp
Once you have your DB record open check the recordset for "" or null as say
IF IsNull(rs("filenamehere")) or rs("filenamehere")="" OR Len("filenamehere")=0 THEN
'script to update here
End IF
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| I'm attempting to write ASP code to retrieve the value of a field returned
| from a database, and then (if the value equals ZERO, either by being a zero
| or being a null value), I want to assign a ZERO value to a variable.
|
| Can anyone help me to this? I just can't figure out how to use a value
| statement to retrieve the value of a database field.
|
| Help?
 

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

Top