Visual Studio 2010 Vb.net
I want to write these values to the database
using this but I am not sure of the sintax
cn = New OleDb.OleDbConnection
cn.ConnectionString = (My.Settings.cnStringAdo1)
command = New OleDb.OleDbCommand
command.Connection = cn
command.Connection.Open()
command.CommandText = ("UPDATE [3320Monitor].MASTERSCHEDULE (BOXES,CUT,CODE) where CODE='" & txtcode.Text + "'")
command.ExecuteNonQuery()
command.Connection.Close()
I want to overwrite the records based on teh TXTCODE.TEXT
The fields I want to update BOXES, CUT, CODE their values come from a TXTBOXES.TEXT and TXTCUT.TEXT and TXTCODE.TeXT
AGAIN is WINDOWS FORMS 2010 VB
..also, if you do
Dim RecordsCount as integer = command.ExecuteNonQuery()
You'll get the number of records affected.