-1

i'am trying to update a row in a table using :

command.ExecuteNoQuery()

it's not giving me an error but it's not updating the row

This is my code :

Dim req As String = "Update Table Set Id= 5"
Dim cmd As New OleDb.OleDbCommand(req, connect())
cmd.ExecuteNonQuery()
disconnect()

thanks

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Wassim AZIRAR
  • 10,823
  • 38
  • 121
  • 174

2 Answers2

0

Make sure that ID isn't an IDENTITY column.

kervin
  • 11,672
  • 5
  • 42
  • 59
0

the problem is that the query was too slow with MS Access.

Now it's working fine MS SQL Server.

Wassim AZIRAR
  • 10,823
  • 38
  • 121
  • 174