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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2005
    Location
    Laguna, Philippines
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What's wrong with this insert statement?

    clientcode = integer
    product = string
    quantity = integer
    dateorder = string
    price = integer

    "insert into orderinvent ([clientcode], [product], [quantity], [dateorder], [price]) values (1,'BluSkies',1,'2005/08/17',20)"
    "It is the unknown we fear when we look upon death and darkness, nothing more!"-- Albus Dumbledore

  • #2
    New Coder
    Join Date
    Aug 2005
    Location
    Laguna, Philippines
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this one too, can you help me? it says update syntax error, i dont know why
    p2 is a string while code is a number

    set vanny = server.createobject("adodb.recordset")
    sql = "UPDATE purchase SET password ='" & p2 & "' WHERE clientcode=" & code
    cone.execute(sql)

    tnx in advance
    "It is the unknown we fear when we look upon death and darkness, nothing more!"-- Albus Dumbledore

  • #3
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Add this line between your sql = ".." and cone.execute line:
    Code:
    Response.Write "<p>sql = " & sql & "</p>" & vbcrlf
    Then paste what gets written to the screen here for us to see. Off the top of my head without seeing what values you are submitting, you might want to check for ' in your strings. If you don't escape an apostophe, you'll get an error.


  •  

    Posting Permissions

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