OK, here's what I did, a bit more elegant than the first time. I
added the following to my UDF library include file:
function isNullNumeric(str) {
if (isNumeric(str)) {
response = "no";
} else {
response = "yes";
}
return response;
}
function isNullString(str) {
if (len(trim(str)) GT 0) {
response = "no";
} else {
response = "yes";
}
return response;
}
function isNullDate(str) {
if (isDate(str)) {
response = "no";
} else {
response = "yes";
}
return response;
}
And my cfqueryparam, when called, looks like this:
<cfqueryparam value="#getRecordData.categoryid#"
cfsqltype="CF_SQL_INTEGER"
null="#isNullNumeric(getRecordData.categoryid)#">
Easier and reusable :)
Pete
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204612
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54