Results 1 to 2 of 2

Thread: INSERT INTO error

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2002
    Posts
    17

    INSERT INTO error

    sqlscript = "INSERT INTO Supportcall(ID,Description,Date,Status,Operator,Action,Customer,Contact)" & " VALUES('" & txtcallnumber.Text & "','" & txtcalldescription.Text & "','" & txtdate.Text & "','" & txtstatus.Text & "','" & txtoperator.Text & "','" & txtaction.Text & "','" & cmbcustomer.Text & "','" & txtcallcontact.Text & "')"

    The above script fails when called to insert some text from the form. Any thoughts?

    Is it anything to do with the date field?

  2. #2
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    You only need to include single quotes around a text or date value being concatenated not for numbers. If they are all text or dates then I'm wrong but your id is probably a number? and you have single quotes around it.
    If you are using SQL Server then single quotes around a date is correct but if it's Access then try #.

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