Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Beginning ASP.NET 1.1
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.1
This is the forum to discuss the Wrox book Beginning ASP.NET 1.1 with Visual C#.NET 2003 by Chris Ullman, John Kauffman, Chris Hart, Dave Sussman, Daniel Maharry; ISBN: 9780764557088
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.1 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 17th, 2005, 09:39 AM
Registered User
 
Join Date: Jun 2005
Location: Glasgow, , United Kingdom.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 9 - Try It Out on Page 306

I'm having some trouble getting this example to work. The only edit I've made to the code is to change the connectionString to that appropriate for a database running on my local machine, the rest of the example having been downloaded directly from the sample online code. The error I'm getting is that the call to

Code:
dataAdapter.Update(data, "Employees")
, which appears on Line 92 in the original sample code, produces the error

Code:
System.Data.OleDb.OleDbException: Operation must use an updateable query.
The query in question, I take it, is the

Code:
SELECT EmployeeID, FirstName, LastName FROM Employees;
one used to instantiate the dataAdapter?

I've checked this query physically within Northwind.mdb, and it produces an editable result using Access's own query tool. I've tried removing all relationships with other tables in Northwind to see if that fixed the problem, but had no luck with that.

Do any of you have any ideas on what's producing the error?

Thanks, Rach.
Reply With Quote
  #2 (permalink)  
Old June 18th, 2005, 05:59 AM
Registered User
 
Join Date: Jun 2005
Location: Glasgow, , United Kingdom.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've been having a further look at this problem, and it seems to be an issue that's specific to Visual Studio and/or IIS. The code runs fine on Web Matrix's own web server.
Reply With Quote
  #3 (permalink)  
Old June 18th, 2005, 06:59 AM
Imar's Avatar
Wrox Author
Points: 67,815, Level: 100
Points: 67,815, Level: 100 Points: 67,815, Level: 100 Points: 67,815, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,295
Thanks: 66
Thanked 1,441 Times in 1,421 Posts
Default

This sounds like a permissions issue to me.

Apparently, the Web Matrix web server runs under a different user account than IIS.

Check out this FAQ to find out how to fix this:

http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=263

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #4 (permalink)  
Old June 18th, 2005, 07:25 AM
Registered User
 
Join Date: Jun 2005
Location: Glasgow, , United Kingdom.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, Imar; that's exactly what the problem was. I really appreciate you taking the time to help.

Rach. :)
Reply With Quote
  #5 (permalink)  
Old June 18th, 2005, 12:40 PM
Imar's Avatar
Wrox Author
Points: 67,815, Level: 100
Points: 67,815, Level: 100 Points: 67,815, Level: 100 Points: 67,815, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,295
Thanks: 66
Thanked 1,441 Times in 1,421 Posts
Default

You're welcome. Glad it's working.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools
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 3, Page 110 ntonline1 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 November 24th, 2008 05:00 PM
Chapter 7 - page 212 asplundo BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 February 2nd, 2008 06:56 AM
chapter 3.0 try it out page 74 rat BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 August 3rd, 2006 02:51 PM
exam 70-306(Dev & Impl Wind App with VB.Net subhanak General .NET 0 May 25th, 2006 12:41 PM



All times are GMT -4. The time now is 12:17 PM.


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