Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

Why this code is not updating database?

$
0
0
Looks fine to me but it is not updating field c2.

Code:

          Dim query as String = "UPDATE tt1 SET c2=@c2 WHERE c1=@c1 AND ID=@ID"
              Dim comm As New FbCommand(query, conn)
                conn.Open()
                For x As Integer = 0 To 12
                    With comm.Parameters
                        .AddWithValue("@c2", bb(x).Text)
                        .AddWithValue("@c1", x)
                        .AddWithValue("@ID", s_ID)
                    End With
                    comm.ExecuteNonQuery()
                Next


Viewing all articles
Browse latest Browse all 2918

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>