Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rionmonster/f984cbaef10e846e5c841aef5c8fbec0 to your computer and use it in GitHub Desktop.
Save rionmonster/f984cbaef10e846e5c841aef5c8fbec0 to your computer and use it in GitHub Desktop.
' Build a Connection to use
Using connection = New OleDbConnection("{your-connection-string}")
' Open your connection
connection.Open()
' Build your query (using parameters)
Dim query = "UPDATE tb_kamar SET no_ktp = NULL WHERE no_kamar = ?"
' Build a command to execute
Using command = New OleDbCommand(query, connection)
' Add your parameters
command.Parameters.AddWithValue("@sed", cbnokam.Text)
' Execute your update
command.ExecuteNonQuery()
End Using
End Using
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment