Using a variable in a function call -
i have tried can think of , me, there's no reason not work. however, asp not native language , need insight. have variable defined request url. want use variable in function call.
if pub_id <> "" response.write(pub_id) response.write(pulldownquery("newsletter_publication",pub_id,"live",newsletter_query)) else response.write(pulldownquery("newsletter_publication","","live",newsletter_query)) end if
however, not work. work, though, if hard code id value portion of function call.
response.write(pulldownquery("newsletter_publication",58,"live",newsletter_query))
when print pub_id returns 58 (or whatever id happens be). missing here causing variable not work function call?
a solution found explicitly define pub_id variable integer, not string.
pub_id = cint(pub_id)
once defined such, everythig worked charm.
Comments
Post a Comment