Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    Holland
    Posts
    2

    Unanswered: Help: SQL command from ColdFusion to Progress 9.1D database

    So

    Hi there,

    I'm almost clamping myself on my last straw here on this one.
    I've succeeded in connecting ColdFusion 5 Server via MS ODBC (using the native Progress driver) to a copy of the Progess 9.1D demo database. Selected fields are read out, although I had to find a way first to prevent column names like Cust-Num by a Column Renaming Custom Tag. So the index column name Cust-Num is translated to custnum.

    Now the next step is the problem:

    I want to see if I can insert/modify records in this database.
    So my query is:

    <CFQUERY DATASOURCE="#application.MainDSN#" NAME="modify">

    UPDATE pub.Customer

    SET

    name = '#form.name#',
    address = '#form.address#'

    WHERE cust-num = '#form.custnum#'

    </cfquery>

    And I get this error:



    ODBC Error Code = S0022 (Column not found)


    [DataDirect-Technologies][ODBC PROGRESS driver][PROGRESS]Column not found/specified (7520)


    Can somebody please explain me how to get the SQL-statement right?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    try putting cust-num in quotes, progress is probably parsing it as a subtraction of column num from column cust

    by the way, you don't need a custom tag to redefine columns, just assign aliases right in the sql

    Code:
    select "cust-num" as custnum, "foo-bar" as foobar, etc.
    rudy
    http://rudy.ca/

  3. #3
    Join Date
    Jul 2002
    Location
    Holland
    Posts
    2

    Smile

    Hey Rudy thanks! It's working!

Posting Permissions

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