S
steve0531
Unregistered / Unconfirmed
GUEST, unregistred user!
c/s结构,客户端如何使用ClientDataSet调用如下在Oracle中定义的函数? <br><br>Oracle中定义的函数如下: <br>CREATE OR REPLACE FUNCTION PR_GETLOGINID(LOGINID VARCHAR2, ILEN INTEGER) RETURN VARCHAR2 IS <br> ICOUNT INTEGER; <br> RESULT VARCHAR2(100); <br>BEGIN <br> SELECT COUNT(*) INTO ICOUNT FROM SYSUSERLIST WHERE FLOGINID=LOGINID; <br> IF ICOUNT = 0 THEN <br> RESULT := LOGINID; <br> ELSE <br> SELECT LOGINID &brvbar; &brvbar; '-' &brvbar; &brvbar; NVL(MAX(SUBSTR(FLOGINID,ILEN+2,LENGTH(FLOGINID)-ILEN-1))+1,1) INTO RESULT <br> FROM SYSUSERLIST WHERE FLOGINID LIKE LOGINID &brvbar; &brvbar; '-%'; <br> END IF; <br> RETURN(RESULT); <br>END PR_GETLOGINID; <br><br>还望不啬赐教,我调用几次都不成功。 <br>请给一下客户端使用ClientDataSet调用的代码,非常感谢。