RE: addnew in dataset how ?



Hi all,

I found the next solution:
Dim newrow As DataRow = DataSet11.Tables("Tablename").NewRow()
newrow("Columnname") = txtCP.Text
newrow("Date") = Today
DataSet11.Tables("Tablename").Rows.Add(newrow)
OleDbDataAdapter1.Update(DataSet11)

Hope you can use this.

regards, Ger.


"Ger" wrote:

> I am learning and searching and reading etc etc, but i cannot find how to add
> records to a dataset. I have read, that i need the method "AddNew" of the
> object "BindingContext", but what I try, I don't get an object
> "BindingContext".
>
> What have I done ?
> Put on a Webform several controls (textboxes) and in the properties I did
> DataBinding. Running the page the textboxes display the right record from the
> database via the dataset, but when I try to add code (e.g.):
> me.bindingcontext(objdsDataset1, "xxx").addnew() there is no method
> "bindingcontext".
>
> How do I add a record to a dataset ??? Help please.
>
> Ger.
.



Relevant Pages

  • addnew in dataset how ?
    ... I am learning and searching and reading etc etc, but i cannot find how to add ... object "BindingContext", but what I try, I don't get an object ... Running the page the textboxes display the right record from the ...
    (microsoft.public.data.oledb)
  • Re: Query analyzer bug ?
    ... Thanks for your answer Tibor....I am busy with reading, ... regards, Ger. ... Prev by Date: ...
    (microsoft.public.sqlserver.tools)