Re: Help needed with ADO Update
- From: "Neil Gould" <neil@xxxxxxxxxxx>
- Date: Wed, 2 Aug 2006 08:35:41 -0500
Hi Daniel,
Thanks for your thoughts.
Recently, Daniel Crichton <msnews@xxxxxxxxxxxxxxxx> posted:
Bob wrote on Wed, 2 Aug 2006 07:19:33 -0400:My "actual code" followed the form suggested by Bob, as in the first post
Daniel Crichton wrote:
<snip>
<snip>sql="UPDATE MyDbTbl SET f1 = ?, f2 = ? WHERE Usr_ID =?"
Good thought, but I don't think so in this case. If he was using a
Operation must use an updateable query.
----------
Any ideas of why this isn't considered an "updateable query"?
No primary key on the table(s) referenced.
recordset to perform the update then that would definitely be a
possibility (although there might be a different error message).
I've only ever seen that message when trying to update a recordset
without the table having a primary key. Without Neil posting the
actual code he's using, we can only guess at what he's doing - and
I'm guessing he's still using recordset.
Neil: please post your actual code, not snippets, because otherwise
we're all just taking stabs in the dark.
Dan
that you responded to. IOW, for this error I was not using recordset, but
the SQL update statement for the "oCmd" object. I also verified that the
SQL statement was valid via the response.write test prior to executing the
command.
As a bit of background, while I'm fairly new to using ASP, I'm not new to
SQL database dev. I've had a few commercial SQL-based RDBMS apps in the
market for over 15 years (not using Access as a db engine), so I'm
generally comfortable with such code, as well as with best practices for
validating data prior to executing SQL commands.
For this project, I'm working with a non-profit club to set up their
website, and am at the point where I need to set up online interaction
with the club's database (Access was their choice, and I also set that up
for them at the beginning of the year). All of the read-only functions
have been working well for about 4 months, and this is the first of the
write functions that I have attempted. Hopefully, once I have a working
"update" function, the same structure will be useful for add & delete
operations. So, this is largely an educational undertaking for me!
FWIW, I read the reference materials from Bob's pointer re: "...updateable
query" error, and enabled the read/write permissions on the host for the
directory containing the database. It's interesting that the read-only db
operations are unaffected by not having read permission set for the
directory, but that's just one more in an increasing list of
counter-intuitive events! I still got the same error, but it may be that
the change hasn't been registered by the host, so I'll try again in a
little while.
Thanks to both of you for help on this!
Neil
.
- Follow-Ups:
- Re: Help needed with ADO Update
- From: Daniel Crichton
- Re: Help needed with ADO Update
- References:
- Help needed with ADO Update
- From: Neil Gould
- Re: Help needed with ADO Update
- From: Daniel Crichton
- Re: Help needed with ADO Update
- From: Neil Gould
- Re: Help needed with ADO Update
- From: Bob Barrows [MVP]
- Re: Help needed with ADO Update
- From: Neil Gould
- Re: Help needed with ADO Update
- From: Bob Barrows [MVP]
- Re: Help needed with ADO Update
- From: Neil Gould
- Re: Help needed with ADO Update
- From: Daniel Crichton
- Re: Help needed with ADO Update
- From: Bob Barrows [MVP]
- Re: Help needed with ADO Update
- From: Daniel Crichton
- Help needed with ADO Update
- Prev by Date: Re: Help needed with ADO Update
- Next by Date: Re: Help needed with ADO Update
- Previous by thread: Re: Help needed with ADO Update
- Next by thread: Re: Help needed with ADO Update
- Index(es):
Relevant Pages
|
|