If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Help: SQL command from ColdFusion to Progress 9.1D database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-11-02, 06:38
ZggZg ZggZg is offline
Registered User
 
Join Date: Jul 2002
Location: Holland
Posts: 2
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?
Reply With Quote
  #2 (permalink)  
Old 07-11-02, 08:45
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,540
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/
Reply With Quote
  #3 (permalink)  
Old 07-11-02, 09:48
ZggZg ZggZg is offline
Registered User
 
Join Date: Jul 2002
Location: Holland
Posts: 2
Smile

Hey Rudy thanks! It's working!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On