Update query doesn't update table

D

David Shorthouse

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.
 
C

CJM

David Shorthouse said:
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
 
B

Bob Barrows [MVP]

David said:
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
 
P

Phill. W

David Shorthouse said:
. . . 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.
 
D

David Shorthouse

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
 
B

Bob Barrows [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,404
Latest member
PerryRutt

Latest Threads

Top