423,850 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,850 IT Pros & Developers. It's quick & easy.

Update query doesn't update table

P: n/a
Hello folks,

I have a problem with an update query on an asp not updating the table
in an Access db. The code runs, I have no errors, but when I examine the
table, nothing was updated. The query works as it should in Access. Could
anyone direct me to some sources that describe solutions to what is likely a
common problem? The strange thing is, I have another update query for a
different db on an asp that works just great. Is there something I may have
neglected to do for the db itself whose update query on an asp doesn't seem
to work? Security issue?

Thanks for any ideas,

David

______________________________
Remove "_SPAM" to reply directly.
Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
David Shorthouse wrote:
Hello folks,

I have a problem with an update query on an asp not updating the
table in an Access db. The code runs, I have no errors, but when I
examine the table, nothing was updated. The query works as it should
in Access. Could anyone direct me to some sources that describe
solutions to what is likely a common problem? The strange thing is, I
have another update query for a different db on an asp that works
just great. Is there something I may have neglected to do for the db
itself whose update query on an asp doesn't seem to work? Security
issue?

Hard to say without seeing code. Do you have "on error resume next" anywhere
in your code? If so, comment it out - it may be masking the problem.

Bottom line, we need to see some code to allow us to reproduce the problem
for ourselves before we'll be able to comment on what's happening.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2

P: n/a
CJM

"David Shorthouse" <davidshorthouse@shaw_SPAM.ca> wrote in message
news:en*************@TK2MSFTNGP12.phx.gbl...
Hello folks,

I have a problem with an update query on an asp not updating the table
in an Access db. The code runs, I have no errors, but when I examine the
table, nothing was updated. The query works as it should in Access. Could
anyone direct me to some sources that describe solutions to what is likely
a common problem? The strange thing is, I have another update query for a
different db on an asp that works just great. Is there something I may
have neglected to do for the db itself whose update query on an asp
doesn't seem to work? Security issue?

Thanks for any ideas,

David


David,

I assume you are doing this in ASP? In which case, I would repost to
m.p.i.asp.db with a bit more detail, like some code for example.

As it stands we would be hard push to help you other than by guessing.

Chris
Jul 22 '05 #3

P: n/a
"David Shorthouse" <davidshorthouse@shaw_SPAM.ca> wrote in message
news:en*************@TK2MSFTNGP12.phx.gbl...
. . . an update query . . . not updating the table in an Access db.
The code runs, I have no errors, . . .
The query works as it should in Access.


Are there any wild-card characters in your SQL?
Something like :

Delete From X
Where KeyField Like 'Z*'

The wildcard character for just about everything /other/ than
Access is "%".

HTH,
Phill W.
Jul 22 '05 #4

P: n/a
In my fiddling around, I think I solved it by really scrutinizing my code. I
had no idea that the "Where" parameter should be at the end of the string of
parameters for the Data Connection to the update query.

Dave

--
______________________________
Remove "_SPAM" to reply directly.

I have a problem with an update query on an asp not updating the table
in an Access db. The code runs, I have no errors, but when I examine the
table, nothing was updated. The query works as it should in Access. Could
anyone direct me to some sources that describe solutions to what is likely
a common problem? The strange thing is, I have another update query for a
different db on an asp that works just great. Is there something I may
have neglected to do for the db itself whose update query on an asp
doesn't seem to work? Security issue?

Thanks for any ideas,

David

Jul 22 '05 #5

P: n/a
If I understand you correctly, the key to determining the parameter order is
to test the query in Access. You should supply the parameter values in the
same order that Access prompts you for them when you test the saved query.
It has nothing to do with how you name your parameters (p1, p2, etc.) It's
all about the order in which they appear in your sql statement. The best way
to determine the proper order is to test the query in Access and keep track
of the order in which you are prompted for the values.

HTH,
Bob Barrows

David Shorthouse wrote:
In my fiddling around, I think I solved it by really scrutinizing my
code. I had no idea that the "Where" parameter should be at the end
of the string of parameters for the Data Connection to the update
query.
Dave


I have a problem with an update query on an asp not updating the
table in an Access db. The code runs, I have no errors, but when I
examine the table, nothing was updated. The query works as it should
in Access. Could anyone direct me to some sources that describe
solutions to what is likely a common problem? The strange thing is,
I have another update query for a different db on an asp that works
just great. Is there something I may have neglected to do for the db
itself whose update query on an asp doesn't seem to work? Security
issue? Thanks for any ideas,

David


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #6

P: n/a
Gotcha. I had no idea that the order was important.

Thanks.

--
______________________________
Remove "_SPAM" to reply directly.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:e4*************@TK2MSFTNGP09.phx.gbl...
If I understand you correctly, the key to determining the parameter order
is to test the query in Access. You should supply the parameter values in
the same order that Access prompts you for them when you test the saved
query. It has nothing to do with how you name your parameters (p1, p2,
etc.) It's all about the order in which they appear in your sql statement.
The best way to determine the proper order is to test the query in Access
and keep track of the order in which you are prompted for the values.

HTH,
Bob Barrows

David Shorthouse wrote:
In my fiddling around, I think I solved it by really scrutinizing my
code. I had no idea that the "Where" parameter should be at the end
of the string of parameters for the Data Connection to the update
query.
Dave


I have a problem with an update query on an asp not updating the
table in an Access db. The code runs, I have no errors, but when I
examine the table, nothing was updated. The query works as it should
in Access. Could anyone direct me to some sources that describe
solutions to what is likely a common problem? The strange thing is,
I have another update query for a different db on an asp that works
just great. Is there something I may have neglected to do for the db
itself whose update query on an asp doesn't seem to work? Security
issue? Thanks for any ideas,

David


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.