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

ODBC Update Row with Beginedit not save in Table

P: 1
''The following code will update data in debugger
checking but not save in adapter table eventually.
Please can anyone help,thanks in advance. I am using
VS 2015 and Sql 2014 Exp.

Expand|Select|Wrap|Line Numbers
  1. Dim aConn As New OdbcConnection
  2. aConn.ConnectionString = "DSN=Technm;UID=sa;PWD=12"
  3. aConn.Open()
  4.  
  5.  Dim SQL As String
  6.  SQL = "Select * from Qctbl where AnalyNo='" &    
  7.             TxtAnaId.Text & "' Order By AnaId"
  8.  da3 = New OdbcDataAdapter(SQL, aConn)
  9.  
  10.  cmdBuilder2 = New OdbcCommandBuilder(da3)
  11.         ds1 = New DataSet()
  12.         ds1.Clear()
  13.         da3.Fill(ds1, "Qctbl")
  14.         aTable = ds1.Tables("Qctbl")
  15.  
  16. Dim dR1 As DataRow = Foundrow(rwPos)
  17.             dR1.BeginEdit()
  18.             dR1.Item("Category") = txtCatory.Text.ToString
  19.             dR1.EndEdit()
  20.             ds1.AcceptChanges()
  21.             'aTable.AcceptChanges()
  22.  
  23.             da3.Update(ds1, "Qctbl")
Apr 27 '16 #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.