|Subject||Re: ISQL Script Stored Procedure|
> I want to create a stored procedure in iSQL script so then I can applyYou seem confused on a couple of points.
> using isql command prompt & the Script. Any body got any simple
> example to give some idea to create the stored procedure. It will be
> good if there is an example where I can send parameters through vb6.
> May be a parameter to send and a table in return.
VB does not usually interact with iSQL. iSQL is just a client
application that connects to the database server providing a console
window where SQL can be typed. It is not a connection interface for
I am not sure what you would use with vb6, possibly the ODBC driver.
It would be much better to use the .NET driver, but I don't think that
is an option in vb6.
Stored procedures do *** NOT *** return 'tables'. Selectable stored
procedure return sets of data that may look to your application the
same way a table would look, but these sets are not tables.
In terms of the syntax, it is 99.9% the same as IB6.
You can download the Interbase 6 Language Reference from here:
The combined release notes of Firebird 1.5 and Firebird 2.0 detail the
enhancements, or there is also The Firebird Book (Helen Borrie) which
has a few chapters on the topic.
You also need to understand that stored procedures are Data Definition
Language (DDL) stuff. A stored procedure can be either executable
(doesn't return anything) or selectable (returns a set).
Executable is called like this
execute procedure MyProcedure('Foo');
A Selectable procedure would look be called like this
Defining a stored procedure is something you do once, and the act of
declaring it does not do anything in the same way that creating a
table does not return anything.
You must understand this distinction, because Firebird does not like
you mixing DDL with DML commands (like select, execute, insert, update
and delete) in the one transaction.