You get no error when your code executes this UPDATE
, and cmdUpdate.ExecuteNonQuery()
returns 1 as expected.
UPDATE [Rooms]
SET [Rooms].[Main Space Category] = '5'
WHERE [Rooms].[Number] = '100';
Yet you report the db does not actually get updated. Investigate that point further. Try this SELECT
from the same OleDB connection object you used when executing the UPDATE
.
SELECT [Rooms].[Main Space Category]
FROM [Rooms]
WHERE [Rooms].[Number] = '100';
For extra measure, double-check the Data Source in the connection object's ConnectionString
property.
Console.WriteLine(connection.ConnectionString)