0

我正在尝试安装 CF 2016 中的现有代码...我收到此错误

“[Macromedia][DB2 JDBC 驱动程序][DB2]非法符号 =;有效符号是……”

标识的行是存储过程调用的参数,如下所示:

<cfstoredproc datasource="#application.dsn#" procedure="LIVE.STOPS">
    <cfprocparam type="In" cfsqltype="CF_SQL_BIGINT" dbvarname="STOPID" value="#val( variables.procstopid )#" null="no">
    <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbvarname="TRIPID" value="#val( url.tripId )#" null="no">
</cfstoredproc>

我在存储的 proc 标记中找不到任何提及 - 也许是 DB2 驱动程序?我正在寻找任何输入。谢谢。

其他信息;Windows10,Apache2.4,连接到 DB2 v10。

@pendo,这是存储的过程 - 应该注意的是,我缩写了一些 sql,但 SP 可以工作并且在运行 CF10 的应用程序中已经存在很长时间了。

CREATE OR REPLACE PROCEDURE LIVE.STOP(
    IN stopId BIGINT DEFAULT 0,
    IN tripId INTEGER DEFAULT 0
) LANGUAGE SQL

BEGIN

DECLARE updateTripId INTEGER DEFAULT 0;
DECLARE minStopId BIGINT DEFAULT 0;
DECLARE maxStopId BIGINT DEFAULT 0;

DECLARE TripSearch_cursor CURSOR FOR 
    SELECT s1.fkTripsId
    FROM live.paymentsTripsStops s1
    JOIN  live.Trips t ON s1.fkTripsId = t.Id
    WHERE s1.fkStopsId = stopId 
    FETCH FIRST 1 ROWS ONLY;

DECLARE minMaxStop_cursor CURSOR FOR 
    SELECT
       COALESCE(
           (
                SELECT s.Id
                FROM  live.Stops s
                JOIN  live.Trips t ON s.fkTripsId = t.Id
                ORDER BY s.Sequence
                FETCH FIRST 1 ROWS ONLY
           ),
           0
       ) AS firstStopId,
       COALESCE(
           (
               SELECT s.Id
                FROM  live.Stops s
                JOIN  live.Trips t ON s.fkTripsId = t.Id
                ORDER BY s.Sequence DESC
                FETCH FIRST 1 ROWS ONLY
           ),
           0
       ) AS lastStopId
    FROM   live.Trips t
    WHERE  t.Id = updateTripId 
    FETCH FIRST 1 ROWS ONLY;

IF TripId > 0 
THEN SET updateTripId = TripId;
ELSE OPEN TripSearch_cursor;
    FETCH FROM TripSearch_cursor INTO updateTripId;
CLOSE TripSearch_cursor;
END IF;

IF updateTripId > 0 
THEN OPEN minMaxStop_cursor;
    FETCH FROM minMaxStop_cursor INTO minStopId, maxStopId;
CLOSE minMaxStop_cursor;

UPDATE live.Trips
SET fkFirstStopId = minStopId,
    fkLastStopId = maxStopId
WHERE  intId = updateTripId;
END IF;

END
4

0 回答 0