Results 1 to 2 of 2

Thread: SQL (DAO) Question - Silent Error

  1. #1

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Why is it that the Execute method does not produce a type-mismatch error as it should?
    My problem was that I had a statement like this:
    MyDB.Execute "UPDATE ... WHERE TextField = " & MyValue & " .."
    VB/DAO/Jet did not give me an error, but also did not update my record.
    Upon debugging, I fixed the statement as follows:
    MyDB.Execute "UPDATE ... WHERE TextField = '" & MyValue & "' .."
    And it worked fine.
    But it would have been nice to have gotten a type-mismatch error initially, which would have saved me some debug time.

    "It's cold gin time again ..."

    Check out my website here.

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264

    Cool

    Did you have any "on error resume next" in your code maybe ?
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width