Here is some code using VB, might vary in SE
Option Explicit
Dim GroupStr1,SQLStr, BatchIDStr As String
Dim Rs1 As New ADODB.Recordset
Dim Conn1 As New ADODB.Connection
Dim Times As Variant
Dim Ck_Val As Single
Sub Main()
Times = "'" + Format(Now,"yyyy-mm-dd hh:mm:ss") + "'"
BatchIDStr = GetVariableValue(GroupStr1 & "Cooker_Batch_Code")
Ck_Val = GetVariableValue(GroupStr1 & "Cook_Value")
Conn1.ConnectionString = "dsn=SP3DB;uid='sa';pwd='';"
SQLStr = "UPDATE Cooker_Batch SET CookCompleted =" & Times & ", CookValue = " & Ck_Val & " Where BatchID =" & BatchIDStr & "
Conn1.Open
Conn1.Execute SQLStr
Conn1.Close
Set Conn1 =Nothing
SetVariableValue(GroupStr1 & "Scada_Batch_Complete",False)
End Sub
So in essence the update string is
UPDATE table_name SET column1 = value1, column2 = value2, ...
WHERE condition;
Insert is just the string:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);