 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP 3.0 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
|
|
|
|
|

February 2nd, 2004, 06:54 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 14--SQLUpdate.asp Try it out
I seem to have hit a road block on this try it out. I am getting an error when I run this in my browser:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/aspfiles/sqlupdate.asp, line 30
I checked the code many times even letter by letter. (I missed a punctuation in chapter 12) and everything checks out. I even used the code from the Wrox downloads. Same error.
Here is the code:
<%
option explicit
dim strConnect
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Using SQL's UPDATE Command and the ADO Command Object</title>
</head>
<body>
<%
dim objComm, intNoOfRecords
Set objComm = Server.CreateObject("ADODB.Command")
Response.Write "<B>Harry the Ham directs Quentin Tarantino films?</b><br>"
objComm.ActiveConnection = strConnect
objComm.CommandText = "UPDATE AllMovies SET Director = 'Harry the Ham' " &_
"WHERE Director LIKE 'Quentin Tarantino'"
objComm.CommandType=adCmdText
objComm.Execute intNoOfRecords
Response.Write "This UPDATE command has affected " & intNoOfRecords & " records<br><br>"
Response.Write "<b>Tarantino returned to his rightful place as director:</b><br>"
objComm.CommandText = "UPDATE AllMovies SET Director = 'Quentin Tarantino' " &_
"WHERE Director LIKE 'Harry the Ham'"
objComm.Execute intNoOFRecords
Response.Write "This UPDATE command has affected " & intNoOfRecords & " records<br><br>"
Set objComm = Nothing
%>
</body>
</html>
I checked the Access files and nothing seems to be configured to make the database "un-updateable"
Any ideas?
BTW there is nothing on the errata list I downloaded from this site (it has chapter 8's errors then skips to chapter 15 for the application)
Thanks,
JB977
|
|

February 3rd, 2004, 05:03 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
|
|

February 3rd, 2004, 10:33 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the tip, I went there and found a few articles from that source and the MS KB but it is rather confusing how to get the permissions set up correctly. I tried to do what the KB articles said and I still get the error.
Anyone have a source with a clear explanation of how to go about this? Seems rather complicated and involves a lot of tinkering. The book almost makes it seem like it should work easily w/out going through a lot of hoops to make this "try it out" work."
Thanks,
JB977
|
|

February 4th, 2004, 09:06 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
For starters I would check 2 basic things. In Windows Explorer, right-click the folder where the mdb file resides, and choose 'Properties' from the pop-up menu
1. is the mdb file marked as read-only within windows (unlikely but worth checking anyway)
2. on the security tab, check that IUSR_machineName is listed in the 'Group or user names' list.
2.1 If it is listed, check that it has read and write permissions (if it doesn't then add them by checking the relevant box in the bottom list)
2.2 If it isn't listed, use the Add button to add it to the list, then check the read and write boxes in the bottom list.
Let us know how you get on.
rgds
Phil
|
|

February 4th, 2004, 09:34 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
I had the same problem, I managed to get it sorted. Heres how:
http://p2p.wrox.com/topic.asp?TOPIC_ID=9360
Cheers,
John.
|
|

February 4th, 2004, 02:08 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, that did the trick! Thank you for your help both of you (john_reeves41 and pgtips). It is weird, but the MS KB on file sharing says you should have the simple file sharing checked. Funny thing is, I remember seeing the security tab in the folder properties before when exploring XP after installing it. No doubt I will run into more problems as I wade my way through this book. Once I hit Chapter 15 the errors report will help me again, as my edition was an earlier version. If I need help again, I'll be back! Thanks again!
Thanks,
JB977
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| chapter 14 |
vthunder70 |
BOOK: Beginning ASP.NET 2.0 and Databases |
2 |
October 3rd, 2007 02:11 PM |
| Chapter 14 example |
pkumar@ech |
BOOK: Professional Jakarta Struts |
0 |
November 15th, 2006 09:10 AM |
| Chapter 14 |
JonG |
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 |
1 |
March 21st, 2006 10:04 PM |
| Chapter 14 |
Mike Smith |
BOOK: Professional C#, 2nd and 3rd Editions |
2 |
January 4th, 2004 05:13 PM |
| Chapter 14 XML |
starsol |
Beginning PHP |
2 |
July 18th, 2003 10:27 AM |
|
 |