function getStringField()
This function will convert a string that is defined
as "null" or "undefined" in JScript to a blank string.
getStringField() becomes especially useful
when dealing with data as it comes from a recordset. It should
be included in all of your ASP programs that interact with a
database. You will no longer have to worry about the dreaded undefined.
function getStringField(theRSField) {
theStr = String(theRSField);
if (theStr == "null" || theStr == "undefined")
return "";
else
return theStr;
}
That's the end. Feel free to cut and paste this code and use
it yourself. Thanks for reading and feel free to jump around Wise ASP
using the select box at the top of the screen.