[dba-SQLServer] List Box values to SP

Francisco H Tapia my.lists at verizon.net
Mon May 10 10:34:00 CDT 2004


I haven't seen any replies for this to you Martin, so here is a crack at 
it..., mind you I haven't done this but I think it's easy enough to try 
it out...  I would wrap all your items w/ a delimiter (such as | (pipe)) 
into a variable and pass a single string variable to your stored 
procedure, next in the stored procedure I'd unwrap the parameter by 
looping in a while loop and inserting the values into a temp table, then 
using the temp table to inner join into my normal select statement.

The other way to do this is to use dynamic sql which I don't like 
because you end up having to give users direct select access to your 
tables... a practice that I detest.


please let me know if you need some sample code and i'll dig up some 
time to post it today :)


Martin Reid wrote On 5/8/2004 2:54 AM:

>I need to pass the values from a list box in Access to a stored procedure
>which does a multi table insert.Unless of course theres a better way to do
>this?
>
>Martin
>  
>


-- 
-Francisco





More information about the dba-SQLServer mailing list