update records+vb.net

Thread Solved

Join Date: Jun 2009
Posts: 60
Reputation: emint is an unknown quantity at this point 
Solved Threads: 4
emint emint is offline Offline
Junior Poster in Training

update records+vb.net

 
0
  #1
Jul 13th, 2009
Helo every one
i m trying to update record to ms database using vb.net. but i m getting error message. pls help me where i made mistake. here is my code.
  1. Dim da As New OleDb.OleDbDataAdapter("SELECT * From tblCustomer", strPath)
  2. Dim cb As New OleDb.OleDbCommandBuilder(da)
  3. Dim ds As New DataSet
  4.  
  5. ds.Tables("DBGetLoan2000").Rows(position).Item(1) = txtFName.Text
  6. ds.Tables("DBGetLoan2000").Rows(position).Item(2) = txtLName.Text
  7.  
  8. da.Update(ds, "DBGetLoan2000")
  9.  
  10.  
  11. MsgBox("Record updated")
thank you
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3,955
Reputation: adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future 
Solved Threads: 705
Moderator
adatapost adatapost is offline Offline
Senior Poster

Re: update records+vb.net

 
0
  #2
Jul 13th, 2009
emint,
Fill the dataset.
  1. ...
  2. Dim cb As New OleDb.OleDbCommandBuilder(da)
  3. Dim ds As New DataSet
  4. ds.Fill(ds,"DBGetLoan2000")
  5. ...
Last edited by adatapost; Jul 13th, 2009 at 8:58 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 60
Reputation: emint is an unknown quantity at this point 
Solved Threads: 4
emint emint is offline Offline
Junior Poster in Training

Re: update records+vb.net

 
0
  #3
Jul 14th, 2009
helo adatapost
thank you for ur reply, it works fine, thank you
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3,955
Reputation: adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future adatapost has a brilliant future 
Solved Threads: 705
Moderator
adatapost adatapost is offline Offline
Senior Poster

Re: update records+vb.net

 
0
  #4
Jul 14th, 2009
Thanks emint.
Mark this thread as "Solved" if you get solution.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 425 | Replies: 3
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC