Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Multiple selects and stored procedures through VBScript

Multiple selects and stored procedures through VBScript

From: Matt Riggsby <Matthew.Riggsby_at_novainfo.com>
Date: 3 Jan 2003 07:51:03 -0800
Message-ID: <397b5de2.0301030751.74418ae@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US