Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post

    Type mismatch error

    Hello

    I am trying to delete a record from an Access database using:

    Code:
    EMP=Request.Form("email")
    
    
    Response.Write "<hr/>DEBUG SQL:<br/>" & sSQL & "<hr/>" & vbNewLine
    
    
    connection.Execute sSQL("DELETE FROM tblWolf WHERE email = " & TEMP)
    but I get a
    Microsoft VBScript runtime error '800a000d'

    Type mismatch
    error here:

    Code:
    connection.Execute sSQL("DELETE FROM tblWolf WHERE email = " & TEMP)
    I have looked at this site here:

    http://www.computerperformance.co.uk...e_800A000D.htm but I don't think the explanations offered are applicable in this case.

    What, then, might be causing that error?

    Thanks.

    Steve
    Last edited by SteveH; 11-09-2013 at 08:22 PM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    shouldn't that be:
    Code:
    connection.Execute sSQL("DELETE FROM tblWolf WHERE email = '" & TEMP & "'")
    I am the luckiest man in the world

  • Users who have thanked Roelf for this post:

    SteveH (11-11-2013)

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello Roelf

    Thanks for your reply.

    I have tried
    Code:
    connection.Execute sSQL("DELETE FROM tblWolf WHERE email = '" & TEMP & "'")
    but I still get exactly the same error.

    Steve

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    I don't know the sSQL function you refer in your code. Perhaps try plain:
    connection.Execute "DELETE FROM tblWolf WHERE email = '" & TEMP & "'"
    I am the luckiest man in the world

  • Users who have thanked Roelf for this post:

    SteveH (11-11-2013)

  • #5
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    I owe you a beer, Roelf!

    That worked! Record deleted!

    Thank you very much!

    Steve

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    I am the luckiest man in the world


  •  

    Posting Permissions

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