Re: Stored Procedures and Describe with V5
Posted in 1993
->Date: Tue, 18 May 93 09:41:04 GMT ->From: rmy!emory!obelix.informix.com!johnl (Jonathan Leffler) ->To: cortesi@obelix.informix.com ->Subject: Re: Stored Procedures and Describe with V5 ->Cc: informix-list@rmy.emory.edu ->Sender: informix-list-owner@rmy.emory.edu -> ->Dear David, -> ->You can describe any prepared statement. You will get sqlca.sqlcode == 0 ->if it is a SELECT which returns data (as opposed to SELECT INTO TEMP), and ->sqlca.sqlcode > 0 for other statements. The values are defined in -><sqlstype.h> and the code for EXECUTE PROCEDURE is SQ_EXECPROC. If the ->procedure returns no values, sqlda->sqld is zero and the prepared EXECUTE ->PROCEDURE statement should be simply EXECUTED. Otherwise, you should treat ->it exactly as if it was a SELECT statement, declaring a cursor, etc. -> ->Interesting thought: could you declare a croll cursor with hold for EXECUTE ->PROCEDURE? I don't see why not, but I haven't tried it. -> ->It just so happens that I was upgrading my SQLCMD tool (which is written in ->ESQL/C) last night, and it now handles stored procedures. Specifically, I ->had to worry about the CREATE PROCEDURE syntax which is a pain because all ->other statements end at the first unquoted semi-colon, and about how to ->decide between EXECUTE and DECLARE to handle the statement. So this ->information is hot off the press, so to speak. -> ->Yours, ->Jonathan Leffler (johnl@obelix) I think "feature creep" has struck again. When (in what version of various Informix products) did DESCRIBE become available? I looked in my 4GL and ISQL v.4.0 manuals, and found nada. Unfortunately, I am not near my 4.1 manuals at the moment, and the one project on which I use 5.0 engine is "paper poor" (i.e., manuals seem to have been lost). Regards, Alan +------------------------------+---------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, LSC | ( Please note: My opinions do not ) | | P.O. Box 179, M/S 5422 | ( represent official Martin policy. ) | | Denver, Colorado 80201-0179 | Voice: 303-977-9998 | +------------------------------+---------------------------------------+