ODBiC Discussion Board

RE: Thanks, it works!, Gordon Hsu, 07-07-2006

There is still problem

by Gordon Hsu, July 23, 2006 07:18


I sill have problem, not only to pass NULL but also to pass '.

First, <!--SQL StoredProcName $IF($Var$,"'$Var$'",NULL) --> does not work because it will directly pass $Var$ into DB (not a actual content, DB will have the record of $Var$, five characters including two $s). Last imte I only tested to see if NULL can be passed into DB.

If I use <!--SQL StoredProcName $IF($Var$,"'"$Var$"'",NULL) -->, then it will work but if the $Var$ contains the ' (like It's, Tom's etc) then it will not work because it will become 'It's'.

Strangely enough, ' will work in <!--SQL StoredProcName '$Var$' --> even though $Var$ does contain '.

Your help is always appreciated.



Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.