Chapter 14 Page 780-781
I've been working through the samples in the book and have been learning at a great speed. However, I have run into a problem with the code in the book. After keying in the code from Chapter 14, under the section 'Adding Events to the Database', I get a run-time error "Must use updatable query". I've double and triple checked the code and I have it correct. The SQL statement is a valid INSERT query (Double checked by running it directly in the access database and it works). To be double sure I had it correct I loaded the sample code and it too gives the same error at the same spot (the line 'int queryResult = insertCommand.ExecuteNonQuery();')
I am using Visual Studio .Net Professional 2003. Looking into the error I found that the command object's ExecuteNonQuery() method expects a sql statement that returns no records (as the INSERT query does, and indeed the MSDN help file says INSERT queries are accepted).
Has anyone come across this error? Any hints on how to fix?
Thank you in advance for any help!
jonr [at] t1gsoftware [dot] com