DataAdapter question

  • Thread starter Thread starter Ian Frawley
  • Start date Start date
Hi,

Ian said:
Is it OK to ask a DataAdapter question in here as it is a bit more ADO.NET

If it's ok to ask whether it is ok, then it's definitely ok to ask the
question itself. :)

I don't doubt that you can receive a good answer here, particularly if you
have (or want for the answer) example code in C#. However, you may also
want to try microsoft.public.dotnet.framework.adonet .
 
OK well here we go:

I have a Strongly typed DataSet one of the datatables within it has data in
it. I have a stored procedure that expects a parameter that returns data
that also has got to go into the same datatable. Is it possible to bind one
of the columns that is already populated to a paramter of a Dataadapters
select command and call the .Fill to execute the stored procedure which will
fill the remaining empty columns?

I hope this makes sence as its pretty tricky to explain

Ian
 
Ian,

I don't know that you would be able to do this. What it seems like is
you would like to call Update and Fill together, except, that you are going
to update some of the columns in the data table with the return values from
the stored proc, in addition to filling the array.

I don't think that you will be able to do this with the data adapter
alone.

If you can wrap your stored proc so that it returns all of the values in
the stored procedure parameters, then it would work, because then you would
define your Update/Insert/Delete command to map to your columns (in the
parameters, you set the source column), and when the stored proc returns, it
should populate the row correctly.

However, as is, you would have to write custom code to do this.

Hope this helps.
 
Back
Top