Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding records to a dataset

0 views
Skip to first unread message

Philip Townsend

unread,
Oct 7, 2003, 5:05:01 PM10/7/03
to
I have a user control that populates a dataset from a stored procedure.
In the event that the stored procedure returns an empty result set, I
want to add a record to the dataset indicating to the user that the
search returned nothing. How should I add a value to the dataset?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

WizyDig

unread,
Oct 7, 2003, 5:23:46 PM10/7/03
to
Here ya go:
this.BindingContext[dsMyDataSet,"Tablename"].AddNew();

this will add a blank row to the table.
You will need to have a dataset table before you use this code. I'm not
sure what state your dataset is in.
Hope this helps

Wiz

"Philip Townsend" <ptow...@v1tech.com> wrote in message
news:%2378ftaR...@tk2msftngp13.phx.gbl...

0 new messages