What is the single parameter type? XML?
The checkbox list gives you n options (from 0 to every row). If the
parameter is typed as an int, for example, which value are you going to send?
You have to digest the information and send to the parameter.
Options:
Comma Separated List - forces dynamic SQL compile in the stored procedure,
which is not wise, or cursing through the list and creating a temp table to
join to for output. Also a bit kludgy.
XML - Forces you to digest the information up front before sending in (Can
be encapsulated in a method, however). XML is a bit slower than a temp table,
but is an area Microsoft has focus on.
UpdateGram (or native ADO.NET) - can use the updateability of the DataGrid.
This only works well if the checkbox list checked values are represented as a
separate datatable in your DataSet. Otherwise you have a great bit of coding.
Note, however, that this particular option can be fully declarative, if you
wish to play that way; to do this, you need additional DataTables to
represent both the full list and the chosen values. Hope this makes sense.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Jarod" wrote:
Hey
I have storedProcedure that takes 1 param. And I have checkBoxList that I
want to bind to sqlDataSource. The parameter needed for stored procedure is
in gridView.DataKey ( diffrent for every row ). So ... how to connect it.
Jarod