Update query doesn't update table

Discussion in 'ASP General' started by David Shorthouse, Jun 17, 2005.

  1. 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.
    David Shorthouse, Jun 17, 2005
    #1
    1. Advertising

  2. David Shorthouse

    CJM Guest

    "David Shorthouse" <davidshorthouse@shaw_SPAM.ca> wrote in message
    news:...
    > 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
    CJM, Jun 17, 2005
    #2
    1. Advertising

  3. 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"
    Bob Barrows [MVP], Jun 17, 2005
    #3
  4. David Shorthouse

    Phill. W Guest

    "David Shorthouse" <davidshorthouse@shaw_SPAM.ca> wrote in message
    news:...
    > . . . 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.
    Phill. W, Jun 17, 2005
    #4
  5. 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
    David Shorthouse, Jun 17, 2005
    #5
  6. 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"
    Bob Barrows [MVP], Jun 17, 2005
    #6
  7. Gotcha. I had no idea that the order was important.

    Thanks.

    --
    ______________________________
    Remove "_SPAM" to reply directly.
    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > 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"
    >
    David Shorthouse, Jun 17, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Williams
    Replies:
    2
    Views:
    1,124
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Learner
    Replies:
    1
    Views:
    984
    Marina Levit [MVP]
    Jan 30, 2006
  3. Evan M.
    Replies:
    1
    Views:
    1,200
    Evan M.
    Apr 18, 2007
  4. David
    Replies:
    2
    Views:
    608
    Allen Chen [MSFT]
    Jun 8, 2009
  5. rob merritt
    Replies:
    0
    Views:
    188
    rob merritt
    Mar 1, 2005
Loading...

Share This Page