Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > BOOK: Professional C#, 2nd and 3rd Editions
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 11th, 2003, 08:27 PM
Registered User
 
Join Date: Aug 2003
Location: Magna, Utah, USA.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.