Error -239 with IMPROMPTU 6.0 and SQLSERVER 2000 using User Defined Functions (UDF)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SAILLEAU Laurent

    Error -239 with IMPROMPTU 6.0 and SQLSERVER 2000 using User Defined Functions (UDF)

    I have an error -239 when I insert a User Defined Function in my
    Impromtu Report.

    Erreur nº -239 :

    DMS-E-GENERAL, Une erreur est survenue pendant l'opération prepare
    request.
    DMS-E-SS_PARSER, Une erreur a été détectée pendant le traitement de la
    requête SQL.
    DMS-E-SS_INFO_SYNTAX, La description de la fonction 'mytest' dans le
    fichier d'information de la base de données est erronée.

    in english (translate by myself approximatively )
    DMS-E-GENERAL, an error has occurred during operation prepare request.
    DMS-E-SS_PARSER, The underlying database detected an error during
    processing the SQL request.
    DMS-E-SS_INFO_SYNTAX, description of fonction 'mytest' in information
    file of database is false.

    I read carrefully the cognos documentation
    "How to create User-Defined Function" and realised a simple function
    (basic).

    My Database Name id BCmoi (catalog) and owner (schema) is dbo

    My MSFUNCT.INI

    [Database-specific Function List]
    ....
    ....
    mytest=

    at the end of file
    ....
    [mytest]
    label=mytest
    param=0
    return=CH
    exp=mytest ( )
    tip=Syntaxe: mytest() \nGive me a string it works.
    tip1= String Expression

    My COGUDFMS.SQL

    DECLARE DATABASE FUNCTION mytest ( )
    RETURNS STRING
    FUNCTION NAME BCmoi.dbo.mytes t;

    My UDF in SQLSERVER 2000

    CREATE FUNCTION dbo.mytest ( )
    RETURNS NVARCHAR(10)
    AS
    BEGIN
    DECLARE @Lib NVARCHAR(10)
    SELECT @Lib = 'It Works'
    RETURN @Lib
    END


    I would appreciate any help
    Thanks
    Laurent
    saillela@cmcent re.fr
Working...