<(E-Mail Removed)> schrieb
>
> I just spent 4 months taking a dotnet class where i learned very
> little. One of the things I did not learn is this: What are the
> dotnet equivilents of commands such as:
>
> Adodc1.Recordset.AddNew
> Adodc1.Recordset.Update
> Adodc1.Recordset.MoveFirst
> Adodc1.Recordset.MoveNext
> Adodc1.Recordset.Delete
>
> I understand how to connect to the database, set up the data
> adapter, create a dataset, but USING any of this data in a practical
> way seemed way beyond the knowledge of the instructor.
There are no connected Recordsets anymore. There is also no record pointer
anymore.
The result of a query can be read into a DataTable. You can access any
record in the DataTable by specifying the index of the record within the
DataTable.
A "replacement" for AddNew is the NewRow function of the DataTable. It
creates (surprise) a new row (=record). Then add the new row to the Rows
collection of the DataTable.
Calling the updating method of a DataAdapter synchronizes the DataTable with
the table in the database: Records added to the Datatable are inserted in
the database, records deleted are also deleted in the database, and modified
records are updated in the database. That's all done by Insert-, Update-,
and Delete-SQL statements executed by the DataAdapter.
But, why not read the ADO.NET documentation? There it is all explained in
detail.
http://msdn.microsoft.com/library/en...tingDataVB.asp
http://msdn.microsoft.com/library/en...withadonet.asp
For further ADO.NET related questions please turn to
microsoft.public.dotnet.framework.adonet.
--
Armin
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html