Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    2

    Unanswered: PROGRESS problems with ODBC UPDATE

    I'm trying to get an UPDATE to work on a table with a single row.

    I've tried several methods, but am now stumped.

    The ONLY result I get, no matter what format of SQL UPDATE I use is the dreaded:

    Code:
    [MERANT][ODBC PROGRESS driver][PROGRESS]** Unable to understand after -- "DECLARE". (247)
    ODBC Error -2147467259
    Which means PROGRESS hates the syntax...

    The stage I've got to so far is:
    Code:
    SELECT autoline-dublin, autoline-cork, autoline-galway FROM parameters FOR UPDATE OF autoline-dublin, autoline-cork, autoline-galway
    Code:
    UPDATE parameters SET autoline-dublin='newname', autoline-cork='newname', autoline-galway='newname'
    What seems to be happening is that the ' (single-quite) is being stripped off the string inside the "" (double-quotes), so that the string being passed to the EXECUTE appears to be:

    Code:
    UPDATE parameters SET autoline-dublin=newname, autoline-cork=newname, autoline-galway=newname
    I'm currently coding in VBA.

    Is there a QUOTE() function in PROGRESS?

  2. #2
    Join Date
    May 2012
    Posts
    1
    i also have the same problem

  3. #3
    Join Date
    Apr 2012
    Posts
    2
    I figured it out, this is the syntax you have to use for ADODB Update statements in VB6/VBA

    Code:
    sSQL = "SELECT field[,...] FROM table FOR UPDATE OF field[,...]"
    Set RS = New ADODB.Recordset
    RS.Open sSQL, conn
    RS.MoveFirst
    sSQL = "UPDATE table SET field=value[,...] "
    conn.Execute sSQL

Posting Permissions

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