stored procs and typed datasets

  • Thread starter Thread starter Nisha
  • Start date Start date
N

Nisha

Hi,

I am having a lot of problem retrieving data from a
stored proc into a typed dataset.

Here is what I have done:

I have a stored proc 'sp_test' which accepts 2 parameters
& executes another proc inside of sp_test... the code is
like this

If rtrim(parm1) = ' '
begin
exec sp_test2
end

select col1, col2, col3 from table1



If I comment out the If stmt in the proc & configure the
sqladapter...it generates the selectcmd and gets the
tablemappings off the select stmt in the proc it would
seem. However, if the IF stmt remains, it causes an error
in table mappings & therefore does allow me to generate a
typed dataset.

If I create a dataset on the fly... i.e. dataset = new
dataset, then the fill works.

However because the dataset is untyped... I actually have
to code the textbox.text value of every textbox or
combobox on my form to get the value from the respective
row / column from the dataset.

Any help would be appreciated.

Thanks in advance.
 
Hi Nisha,

Why don't you just create typed dataset by yourself?
Add New Item.../Dataset from Project menu
Or, before using adapter wizard, comment the if statament (as you find out)
and after uncomment it.
 
not understood your problem exactly. but, as you said, if you comment out
some code and get the typed dataset that you want actually. then, comment
the code, generate typed dataset through dataadapter and then again goto sp
and uncomment the code. it will not effect your typed dataset.

Rajesh Patel
 
Back
Top