G
Guest
I am VERY NEW this whole concept of DataSet and all. I have a code that goes
like this..
=============================================
conn.Open()
Dim ds = New Data.DataSet
'/// The function below is used to create adapter ///
da = CreateCmdsAndUpdate(mySelectQuery, myUpdate, conn)
da.Fill(ds, myTableName)
da.Update(ds, myTableName)
conn.Close()
========================================
Here are my questions to you.
1) I ran it without any error, but update did not take place to the record.
What else could be missing here?
2) Why is Fill method required before Update method? When I tried
commenting out 'da.Fill(ds, myTableName)' and ran the code, it gave me an
error "Update unable to find TableMapping or DataTable [table_name]".
3) Seems like I am updating the whole table, but I indeed only want to
update one row. Is there a better way?
I have been browsing for answer for days and seeing different pieces of
information here and there, but cannot put together the puzzle. If you can
recommend me a good booking regarding making SELECT, UPDATE, INSERT, and
DELETE transactions via ADO.NET, I will greatly appreciate it. Thank you
very much for your time enlightening me.
like this..
=============================================
conn.Open()
Dim ds = New Data.DataSet
'/// The function below is used to create adapter ///
da = CreateCmdsAndUpdate(mySelectQuery, myUpdate, conn)
da.Fill(ds, myTableName)
da.Update(ds, myTableName)
conn.Close()
========================================
Here are my questions to you.
1) I ran it without any error, but update did not take place to the record.
What else could be missing here?
2) Why is Fill method required before Update method? When I tried
commenting out 'da.Fill(ds, myTableName)' and ran the code, it gave me an
error "Update unable to find TableMapping or DataTable [table_name]".
3) Seems like I am updating the whole table, but I indeed only want to
update one row. Is there a better way?
I have been browsing for answer for days and seeing different pieces of
information here and there, but cannot put together the puzzle. If you can
recommend me a good booking regarding making SELECT, UPDATE, INSERT, and
DELETE transactions via ADO.NET, I will greatly appreciate it. Thank you
very much for your time enlightening me.