Private Sub UpdateRecord()
Dim con As OleDb.OleDbConnection = New OleDb.OleDbConnection()
Dim command As OleDb.OleDbCommand = New OleDb.OleDbCommand()
con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & m_strPath & "\database\clients.accdb;Persist Security Info=False;"
command.Connection = con
con.Open()
command.CommandText = "UPDATE tblClients SET [Valid?] = @valid WHERE [Valid Until] < '" & Today.Month & "/" & Today.Day & "/" & Today.Year & "';"
Dim parValid As New OleDb.OleDbParameter("@valid", "N".ToString)
command.Parameters.Add(parValid)
command.ExecuteNonQuery()
con.Close()
End Sub
I'm not understanding why i get the error because the receiving column is text

New Topic/Question
Reply



MultiQuote




|