Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Multiple selects and stored procedures through VBScript
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? Received on Fri Jan 03 2003 - 09:51:03 CST
![]() |
![]() |