Wrox Programmer Forums
|
BOOK: Professional C#, 2nd and 3rd Editions
This is the forum to discuss the Wrox book Professional C#, 3rd Edition by Simon Robinson, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner, Bill Evjen; ISBN: 9780764557590
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C#, 2nd and 3rd Editions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2003, 08:27 PM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
-Jon

jonr [at] t1gsoftware [dot] com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14 Code page 620, help needed! Safi BOOK: Beginning ASP 3.0 3 December 8th, 2010 12:43 PM
chapter 14 vthunder70 BOOK: Beginning ASP.NET 2.0 and Databases 2 October 3rd, 2007 02:11 PM
Chapter 14 JonG BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 March 21st, 2006 10:04 PM
Chapter 14 page 580 Problems with example john_reeve41 BOOK: Beginning ASP 3.0 3 February 4th, 2004 10:21 AM
Chapter 14 Mike Smith BOOK: Professional C#, 2nd and 3rd Editions 2 January 4th, 2004 05:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.