#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2004
    Posts
    2
    Rep Power
    0

    Problem Updating Memo fields w/SQL


    I am having a problem using an sql query to update memo fields in access. Is there some sort of bracketing ro something I need to use?

    Here is my code,

    sql= "update jobs set province='"& province &"', [date]='"& idate &"', school='"& schoolname &"', jobtitle='"& jobtitle &"', salary='"& salary &"', contactname='"& contact &"', tel='"& iphone &"', email='"& iemail &"', website='"& website &"', info='"& iinfo &"', [memo]='"& description &"' where id like 3"

    The last 2 are memo fields


    Thanks everyone!
  2. #2
  3. No Profile Picture
    Moderator: Access, SQL
    ASP Mastermind (5000+ posts)

    Join Date
    Oct 2003
    Posts
    5,126
    Rep Power
    18
    Are you sure it is you memo field and not your date fields and numerix fields that are giving you the trouble (they are wrong too).


    sql= "update jobs set province='"& province &"', [date]= #"& idate &"#, school='"& schoolname &"', jobtitle='"& jobtitle &"', salary="& salary &", contactname='"& contact &"', tel='"& iphone &"', email='"& iemail &"', website='"& website &"', info='"& iinfo &"', [memo]='"& description &"' where id like 3"

    S-
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2004
    Posts
    2
    Rep Power
    0

    memo fields dump into sql statement


    the date fields work fine. The memo fields dump the contents of the field right into the sql statement:

    Error Type:
    Microsoft JET Database Engine (0x80040E14)
    Syntax error (missing operator) in query expression ''I was recently given the position that was posted on your site. However, I have had a change of circumstances that has meant I cannot continue teaching here. I don't want to leave them in trouble so please could you repost the same advert you had posted '.


    thanks
  6. #4
  7. No Profile Picture
    Moderator: Access, SQL
    ASP Mastermind (5000+ posts)

    Join Date
    Oct 2003
    Posts
    5,126
    Rep Power
    18
    Originally Posted by Ponce
    I don't want

    thanks
    When using SQL statement the way you are trying you can't have a ' in the data.

    Try removing the ' and see what happens


    S-

Similar Threads

  1. Updating fields with last entry
    By pinco in forum Microsoft Access Help
    Replies: 0
    Last Post: February 10th, 2004, 08:46 AM
  2. Form not updating all fields
    By skwilliams in forum ASP Development
    Replies: 0
    Last Post: January 29th, 2004, 07:54 AM
  3. Query-by-Form (w/date & memo fields)
    By esskaykay in forum Microsoft Access Help
    Replies: 0
    Last Post: December 29th, 2003, 10:09 AM
  4. ASP/mySQL record updating problem for TEXT fields
    By netsmithuk in forum ASP Development
    Replies: 2
    Last Post: September 24th, 2003, 03:22 PM
  5. Displaying images from FOXPRO MEMO fields
    By Steve Schofield in forum ASP Development
    Replies: 0
    Last Post: May 21st, 2001, 09:36 AM

IMN logo majestic logo threadwatch logo seochat tools logo