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 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow SQL Help Needed Please (ColdFusion MX)

    I have a simple form that should insert data to an access database. However, for some reason it tells me there is a syntax error with the code below. I have checked this a million times and can't find anything wrong with it!

    Code:
    <cfquery name="AddRecord" datasource="030210ics3mp">
    INSERT INTO story (title, intro, body, author, email, date)
    VALUES ('#form.title#', '#form.intro#', '#form.body#', '#form.author#', '#form.email#', '#form.date#')
    </cfquery>

    Please help! Thanks in advance.

    Ps - ColdFusion isn't liking the values section. It says there is a syntax error.

  • #2
    New Coder
    Join Date
    Jul 2004
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Confused!
    I have a simple form that should insert data to an access database. However, for some reason it tells me there is a syntax error with the code below. I have checked this a million times and can't find anything wrong with it!

    Code:
    <cfquery name="AddRecord" datasource="030210ics3mp">
    INSERT INTO story (title, intro, body, author, email, date)
    VALUES ('#form.title#', '#form.intro#', '#form.body#', '#form.author#', '#form.email#', '#form.date#')
    </cfquery>

    Please help! Thanks in advance.

    Ps - ColdFusion isn't liking the values section. It says there is a syntax error.
    Ok I have sorted this problem but just thought I should let everyone know that access database doesn't like you using 'date' as a variable. It is predefined. Hope this helps people in the future!


  •  

    Posting Permissions

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