There are good relevant discussions re this on Erland's site:
http://www.sommarskog.se/

 

Regards,

 

Greg

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Tony Wright
Sent: Wednesday, 14 July 2010 10:49 AM
To: 'ozDotNet'
Subject: RE: Batching ids for submitting to a stored proc

 

That is my traditional method, although building a string of comma delimited
ids isn't exactly type safe.

 

My existing client uses the xml method.

 

I seem to recall seeing a sql trace where a temporary table was populated
and then a stored proc was called all in the same transaction. I was
actually wondering if there was some sort of call that made that happen
automagically.

 

T.

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Keith Peck
Sent: Wednesday, 14 July 2010 10:11 AM
To: ozDotNet
Subject: RE: Batching ids for submitting to a stored proc

 

I've written a user defined function that takes a delimited string and
delimiter as arguments and return a table containing the delimited values.

You can use this inline in your proc in joins etc.

I haven't noted any performance hit doing it this way.

K...
________________________________________
From: [email protected] [[email protected]] On
Behalf Of [email protected] [[email protected]]
Sent: Wednesday, 14 July 2010 9:18 AM
To: [email protected]
Subject: Batching ids for submitting to a stored proc

Hi all,

I have a scenario as follows. I'm interested to hear what other people do to
solve this problem.

I have two Checkbox Lists. The left Checkbox list is Customers. The right
Checkbox list is Shops.
On clicking the checkboxes in the left Customers Checkbox list, it posts
back and calls a stored
proc that retrieves the shops for displaying in the right Shops Checkbox
list.

Obviously there can be multiple checkboxes checked, and so a list of
customer ids somehow needs
to be passed into the stored proc. We are using LINQ to SQL.

The question is, what do other people do in this situation? How would you
get the batch of ids into
the stored procedure for retrieving the list of shops?

Regards,
Tony

 

  _____  

NOTICE - This communication is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking any action in reliance on, this communication by persons or entities
other than the intended recipient is prohibited. If you are not the intended
recipient of this communication please delete and destroy all copies and
telephone SMS Management & Technology on 1300 842 767 immediately. Any views
expressed in this Communication are those of the individual sender, except
where the sender specifically states them to be the views of SMS Management
& Technology. Except as required by law, SMS Management & Technology does
not represent, warrant and/or guarantee that the integrity of this
communication has been maintained nor that the communication is free from
errors, virus, interception or interference.

Reply via email to