kind of directed towards adatapost...
in most of my applications, i have a public function called DBUpdate()
Public Sub DB_Update(ByVal strQuery As String) Dim ADOCmd As New ADODB.Command Try If ADOConnect.State = ConnectionState.Open Then Call CloseConnection() ADOConnect.Open(dsn, user, pass) ADOCmd.ActiveConnection = ADOConnect ADOCmd.CommandText = strQuery ADOCmd.Execute() Catch ex As Exception ' sends error message to me directly with information i need to debug and correct Finally 'clean up End Try End Sub
i have slimmed this down to make it very basic, however
call i do in is whenever i need to update
call db_update("UPDATE TABLE SET COLUMN = 'whatever' WHERE ID = whatever")
how could i implement parameterized queries into a function like this?