>Yea this is quite strange, or quite logical.
>
>Is this an MX thing or an sql thing.
>
>I did a trace on the query, and the string was being passed in as
>('tom,bill,jim') as oppossed to ('tom','bill','jim').
>
>This list is actually be generated by a client side _javascript_ app, which
>then posts the data to CF.
>
>Inside a loop doing I doing this,
>there is evaluation happening which then just puts names to a comma
>deliminated list
>if(field_str!=''){field_str+=','+h[i].value}else{field_str=h[i].value}
>
>//check if the variable is not empty and add to hidden field
>if(field_str!=''){
>    d.value=field_str;
>}
>
>on alert the string effectively looks like this, tom,bill,jim
>
>so get the single quotes in i tried this,
>
>if(field_str!=''){field_str+=','+"'"+h[i].value+"'"}else{field_str="'"+h[i].value+"'"}
>
>but in the trace file the sql trace then shows this,
>
>(''tom','bill','jim'').

I don't think this can be done by simply sending in a list. I posted a while
back about doing this same thing into an Oracle 8i proc, and somebody posted
that it couldn't be done in either Oracle or SQL Server without writing the
stored proc such that it loops over the list of values sent in. I'm not sure
if it's a DBMS or JDBC limitation, and I'm admittedly a bit light in the
stored proc syntax department. Here's the thread I'm referring to:

http://www.houseoffusion.com/cf_lists/index.cfm/method=messages&threadid=28493&forumid=4

Perhaps you can get in touch with Gary regarding the sample script he's
talking about in the thread, as I seem to have misplaced it at the moment.

Regards,
Dave.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to