}From: govind@miller.cs.uwm.edu (Govind Seshadri)
}Subject: Creating Stored Procedures on the fly...
}Date: 2 May 1994 19:03:47 GMT
}X-Informix-List-Id: <news.6567>
}
}I want to be able to recreate stored procedures dynamically, based on
}SPL commands from a disk file. This would enable me to constantly
}change the action of the stored procedure based on varying conditions
}and parameters. According to the manuals, this is a fairly trivial
}task achieved by executing the sql statement:
} create procedure from "myproc.spl"
}where myproc.spl is a disk file containing the SPL statements needed to
}create the procedure.
}But this does not work, and returns the ubiquitous -201 (Syntax Error)
}message. Even after having qualified the file name with the complete
}path, the error persists. What am i missing here?
}I am running Informix Online 5.01 under Sun OS 5.3
I think you're not noting the designation ESQL in front of the syntax
diagram for CREATE PROCEDURE FROM in the Dec 1991 Informix Guide to SQL
Reference Manual. This statement is available in ESQL/C or other ESQL
languages -- it is not available in DBACCESS.
As an aside, the CREATE PROCEDURE FROM file statement is the simplest way
to execute a set of statements -- the contents of the file does not have to
contain a CREATE PROCEDURE statement. SELECT statements won't work; nor
will statements like LOAD, UNLOAD, INFO and OUTPUT which are interpreted by
the front-end.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>