I have a simple sqlce database, trying to update a row in a table. The following command works:
UPDATE ConsoleUsage SET TotalCircuits = 123
But the above command updates all rows, so what I want is this:
UPDATE ConsoleUsage SET TotalCircuits = 123 WHERE Index = 912
The intent is to update a single row in the table. But this command fails, giving the following cryptic error message (here using MS suggested format):
Error Code: 80040E37
Message : [ UPDATE ConsoleUsage SET TotalCircuits = 123 WHERE Index = 912 ]
Minor Err.: 0
Source : SQL Server 2005 Mobile Edition ADO.NET Data Provider
Err. Par. : UPDATE ConsoleUsage SET TotalCircuits = 123 WHERE Index = 912
The "Index" column is an index to the table, I've checked all spelling and I've tried this both with and without cmd.CommandType = CommandType.TableDirect; and cmd.IndexName = "MainIndex";
What am I missing?