RE: addnew in dataset how ?
- From: Ger <Ger@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 6 Apr 2005 06:55:12 -0700
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.
.
- References:
- addnew in dataset how ?
- From: Ger
- addnew in dataset how ?
- Prev by Date: contents of field truncated to 255
- Next by Date: external data link to dynamic file name
- Previous by thread: addnew in dataset how ?
- Next by thread: How to I reinstall the Microsoft OLE DB Provider for Oracle
- Index(es):
Relevant Pages
|
|