one unknown Problem in DataSet and Update ..

farparlove

New member
Joined
Aug 25, 2005
Messages
3
Programming Experience
Beginner
Hello Dear Experts
i use from this below code for update a DataSet
but i give this error :

"Update unable to find TableMapping['table'] or
DataTable 'table' "

Code is :

Dim cn As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\PhoneBook.mdb")
Dim cm1 As New OleDbCommand("Select * from Table1", cn)
Dim da1 As New OleDbDataAdapter(cm1)
Dim ds1 As New DataSet
cn.Open()

da1.Fill(ds1, "Table1")

ds1.Tables("Table1").Rows(0).Item(0) = "Name"
ds1.Tables("Table1").Rows(0).Item(1) = "Family"
ds1.Tables("Table1").Rows(0).Item(2) = "Comment"

da1.Update(ds1)


can anyone help me to solve this problem ?
Thanks alot beforehand
 
Yes , It is .. even i use from FillSchema Method and i didn't saw any Error , but Dataset changes will not be store in mdb file ..
 
Do you have the Update, Delete, and Insert commands built for the Data Adapter. I don't think that would cause the error you are getting, but I did not see code for creating those commands.....
 
Back
Top