Hi,
Can someone please point me in the right direction for updating a single field within a table in Access.
I've been searching and trying numerous examples but I'm having no luck.
I believe my UPDATE command is correct
Here's what I currently have so far in full....
I'm getting a Data type mismatch in criteria expression at the cmd.ExecuteNonQuery()
Any help would be much appreciated.
Many thanks
Can someone please point me in the right direction for updating a single field within a table in Access.
I've been searching and trying numerous examples but I'm having no luck.
I believe my UPDATE command is correct
VB.NET:
UPDATE Table1 SET Field1 ='Test' where id='1'
Here's what I currently have so far in full....
VB.NET:
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\User1\Desktop\Database3.accdb;Persist Security Info=False;")
cn.Open()
cmd = New OleDbCommand("UPDATE Table1 SET Field1 ='Test' where id='1'", cn)
cmd.ExecuteNonQuery()
cn.Close()
I'm getting a Data type mismatch in criteria expression at the cmd.ExecuteNonQuery()
Any help would be much appreciated.
Many thanks