Subject | Re: [firebird-support] Re: ISQL Script Stored Procedure |
---|---|
Author | Sivarasa Visakan |
Post date | 2007-05-02T13:36:10Z |
Thank you Adam for the info,
My appology for not describing the question. You are absolutely right. What I ment was I need the syntax to write SP in iSQL. After creating this SP in Firebird I wanted to access this SP in vb6. I need the syntax to call this SP in VB6 please.
Thank you
Adam <s3057043@...> wrote: > I want to create a stored procedure in iSQL script so then I can apply
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
your application.
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:
http://www.firebirdsql.org/index.php?op=doc
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
select Bar
from MyProcedure('Foo');
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.
Adam
---------------------------------
Yahoo! Answers - Got a question? Someone out there knows the answer. Tryit now.
[Non-text portions of this message have been removed]
My appology for not describing the question. You are absolutely right. What I ment was I need the syntax to write SP in iSQL. After creating this SP in Firebird I wanted to access this SP in vb6. I need the syntax to call this SP in VB6 please.
Thank you
Adam <s3057043@...> wrote: > I want to create a stored procedure in iSQL script so then I can apply
> using isql command prompt & the Script. Any body got any simpleYou seem confused on a couple of points.
> 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
your application.
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:
http://www.firebirdsql.org/index.php?op=doc
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
select Bar
from MyProcedure('Foo');
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.
Adam
---------------------------------
Yahoo! Answers - Got a question? Someone out there knows the answer. Tryit now.
[Non-text portions of this message have been removed]