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

update unable to find table mapping or data table

P: 39
Hi Team,

While am using the below code it was throwing an exception update unable to find table mapping [Customer] or data table customer. Please help me in this regard.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         Try
  3.             con.Open()
  4.             param.ParameterName = "@uname"
  5.             param.ParameterName = "@uid"
  6.             param.ParameterName = "@uprod"
  7.             param.ParameterName = "@uprice"
  8.             param.ParameterName = "@udop"
  9.             param.ParameterName = "@utot"
  10.             param.Value = TextBox1.Text
  11.             cmd.Parameters.AddWithValue("@uname", TextBox2.Text)
  12.             cmd.Parameters.AddWithValue("@uid", TextBox1.Text)
  13.             cmd.Parameters.AddWithValue("@uprod", TextBox3.Text)
  14.             cmd.Parameters.AddWithValue("@uprice", TextBox4.Text)
  15.             cmd.Parameters.AddWithValue("@utot", TextBox5.Text)
  16.             'cmd.Parameters.AddWithValue("@uname", datetimepicker1.
  17.             cmd = New SqlCommand("insert into customer(custid,custname,product,price,total)values(@uid,@uname,@uprod,@uprice,@utot)", con)
  18.             da = New SqlDataAdapter(cmd)
  19.             da.Update(ds, "customer")
  20.             MsgBox("inserted...")
  21.  
  22.  
  23.         Catch ex As Exception
  24.             MsgBox(ex.Message.ToString)
  25.         End Try
  26.         con.Close()
May 22 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.