Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Multiple selects and stored procedures through VBScript
Look on asktom.oracle.com and do a search. Also you are probably building
something unscalable because in all likelihood you are not using bind
variables. Use bind variables.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Matt Riggsby" <Matthew.Riggsby_at_novainfo.com> wrote in message news:397b5de2.0301030751.74418ae_at_posting.google.com...Received on Fri Jan 03 2003 - 10:19:06 CST
> Here's my scenario: I've got a form with a select box. The form is
> submitted to a VBScript page. The page in turn calls an Oracle
> procedure (using the value from the select box as a parameter) which
> returns a record set. The VBScript loops through the recordset
> drawing an HTML table. What we want to do is to allow multiple
> selections in the select box. The query Oracle will run is, I'm
> hoping, something like this:
>
> Select foo from bar where foo in (selected items)
>
> Turning the selected items into something Oracle will recognize as
> distinct bits of data is where I'm falling down. At this point, I'm
> not sure what to do. I can see at least a number of options here:
>
> In the VB, I can pass the contents of the select box on to the
> procedure as a single string or, I suspect, as an array.
>
> In the Oracle procedure, I gather that I could turn the data from the
> form into a PL/SQL table (something I've never done before, btw) and
> use that in the where conditions, thusly:
>
> Select foo from bar where foo = thePLSQLtable.items
>
> I might also parse the form data out somehow and turn it into the
> contents of an in() statement. However, the complexity seems a bit
> daunting for what I would love to be a fairly simple task, and I'm
> considering abandoning procedures entirely and working with SQL
> statements constructed entirely in VBScript.
>
> So, then, any recommendations about the best way to procede?