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

DataSet

P: n/a
Hello everybody, I would like to know if someone can help me with a DataSet.
In my case the select command that fills the DataSet is a view (sql2000)
that contains 10 tables, I have defined the SQLDataAdapter as follows:
Dim SqlAdapter As New SqlDataAdapter("SELECT * FROM vw_DG_PERSONAS", SqlCon)
En evento Load del Frm tengo esto:
SqlCon.ConnectionString = "Server=" & Svr & _
";Database=dgcontrol;uid=" & Usr & ";pwd=" & Psw & ";"
SqlAdapter.Fill(DsPersonas, "vw_DG_PERSONAS")
SqlCon.Close()
DataGrid1.DataSource = DsPersonas
DataGrid1.DataMember = "tbl_per_personas"

My problem is that the window has a DataGrid that shows the view, and I
modify the data, then I want to save the changes to the SQL DB, so
I do the following:

SqlAdapter.Update(DsPersonas), and here this error occurs:
(Update can not find TableMApping('Table') o DataTable 'Table')

Please i someone can help me on working with DataSet, just tell me, Thanks.

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Well, I think Adapters update tables and not dataset so maybe you would need
to specify the table in the database to update.

"Fabian" <kj***@dd.com> wrote in message
news:u4**************@TK2MSFTNGP11.phx.gbl...
Hello everybody, I would like to know if someone can help me with a DataSet. In my case the select command that fills the DataSet is a view (sql2000)
that contains 10 tables, I have defined the SQLDataAdapter as follows:
Dim SqlAdapter As New SqlDataAdapter("SELECT * FROM vw_DG_PERSONAS", SqlCon)

En evento Load del Frm tengo esto:
SqlCon.ConnectionString = "Server=" & Svr & _
";Database=dgcontrol;uid=" & Usr & ";pwd=" & Psw & ";"
SqlAdapter.Fill(DsPersonas, "vw_DG_PERSONAS")
SqlCon.Close()
DataGrid1.DataSource = DsPersonas
DataGrid1.DataMember = "tbl_per_personas"

My problem is that the window has a DataGrid that shows the view, and I
modify the data, then I want to save the changes to the SQL DB, so
I do the following:

SqlAdapter.Update(DsPersonas), and here this error occurs:
(Update can not find TableMApping('Table') o DataTable 'Table')

Please i someone can help me on working with DataSet, just tell me, Thanks.

Nov 20 '05 #2

P: n/a
Fabian,

SqlAdapter.Update(DsPersonas, "Table") -or-
SqlAdapter.Update(DsPersonas, <index of table>)

Hope this helps.

Brad

"Fabian" <kj***@dd.com> wrote in message
news:u4**************@TK2MSFTNGP11.phx.gbl...
Hello everybody, I would like to know if someone can help me with a DataSet. In my case the select command that fills the DataSet is a view (sql2000)
that contains 10 tables, I have defined the SQLDataAdapter as follows:
Dim SqlAdapter As New SqlDataAdapter("SELECT * FROM vw_DG_PERSONAS", SqlCon)

En evento Load del Frm tengo esto:
SqlCon.ConnectionString = "Server=" & Svr & _
";Database=dgcontrol;uid=" & Usr & ";pwd=" & Psw & ";"
SqlAdapter.Fill(DsPersonas, "vw_DG_PERSONAS")
SqlCon.Close()
DataGrid1.DataSource = DsPersonas
DataGrid1.DataMember = "tbl_per_personas"

My problem is that the window has a DataGrid that shows the view, and I
modify the data, then I want to save the changes to the SQL DB, so
I do the following:

SqlAdapter.Update(DsPersonas), and here this error occurs:
(Update can not find TableMApping('Table') o DataTable 'Table')

Please i someone can help me on working with DataSet, just tell me, Thanks.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.