Help with sandcall

barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Help with sandcall

Post by barry.marcus »

I have the following code snippet in my app:

<fmtcp sandcall "\Pw/=\digit+" DoubleIt>
<capture BIN><sb>$qString</sb></capture>
<$qString=$ret>

The routine DoubleIt is defined as follows:

<a name=DoubleIt EXPORT hit>
<$ret=(2*$hit)>$ret
</a>

When qString, which is a SELECT query string, contains a less than symbol (<), the above snippet of code returns < instead, resulting in a syntax error when the query string is sent to SQL.

For example, if qString contains the following:

"... where convert(PATN_ISD,'date') <= '2008-12-31' ..."

the above snippet of code returns this

"... where convert(PATN_ISD,'date') <= '2008-12-31' ..."

How do I eliminate this side effect?

Thanks
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Help with sandcall

Post by mark »

<fmtcp sandcall noesc "\Pw/=\digit+" DoubleIt>
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Help with sandcall

Post by barry.marcus »

Argh! I guess it would help if I read the manual, huh?

Thanks!