PDA

View Full Version : Help: SQL command from ColdFusion to Progress 9.1D database


ZggZg
07-11-02, 07:38
So :confused:

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?

r937
07-11-02, 09:45
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

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

ZggZg
07-11-02, 10:48
Hey Rudy thanks! It's working! :)