By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,620 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Add New

P: n/a
Is there something similar to the
rs.Addnew
....
....
rs.update
from ADO in ADO.Net on an Access or SQL Server database.

Paul
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Paul,
look at the DataSet, the DataTable and the DataRow
The DataSet provides more functionality than the old ADO RecordSet.
A DataSet can hold multiple DataTables (as well as relationships)

something like:
Assuming an existing DataSet

Dim MyDataTable As DataTable
Dim MyDataRow as DataRow

MyDataTable = MyDataSet.Tables("MyTable")
MyDataRow = MyDataTable.NewRow
MyDataRow("MyField1") = 1
MyDataRow("MyField2") = "Test"
MyDataTable.Rows.Add(MyDataRow)

Doug
"Paul Ilacqua" <pi******@twcny.rr.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Is there something similar to the
rs.Addnew
...
...
rs.update
from ADO in ADO.Net on an Access or SQL Server database.

Paul

Nov 21 '05 #2

P: n/a
Paul,

In addition to Doug

Have as well a look at the dataview addnew
http://msdn.microsoft.com/library/de...ddnewtopic.asp

Currencymanager addnew
http://msdn.microsoft.com/library/de...ddnewtopic.asp

I hope this helps?

Cor
"Paul Ilacqua" <pi******@twcny.rr.com>
Is there something similar to the
rs.Addnew
...
...
rs.update
from ADO in ADO.Net on an Access or SQL Server database.

Paul

Nov 21 '05 #3

P: n/a
After I add rows how do I resynch it back to the database?

"Doug Bell" <dug@bigpond> wrote in message
news:eS**************@TK2MSFTNGP14.phx.gbl...
Paul,
look at the DataSet, the DataTable and the DataRow
The DataSet provides more functionality than the old ADO RecordSet.
A DataSet can hold multiple DataTables (as well as relationships)

something like:
Assuming an existing DataSet

Dim MyDataTable As DataTable
Dim MyDataRow as DataRow

MyDataTable = MyDataSet.Tables("MyTable")
MyDataRow = MyDataTable.NewRow
MyDataRow("MyField1") = 1
MyDataRow("MyField2") = "Test"
MyDataTable.Rows.Add(MyDataRow)

Doug
"Paul Ilacqua" <pi******@twcny.rr.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Is there something similar to the
rs.Addnew
...
...
rs.update
from ADO in ADO.Net on an Access or SQL Server database.

Paul


Nov 21 '05 #4

P: n/a
Paul Ilacqua wrote:
After I add rows how do I resynch it back to the database?


Call the Update method on the DataAdapter object which you used to fill your
DataTable. Pass the DataTable to it as the parameter.

--

(O)enone
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.