Executing oracle stored procedure in powerbuilderHi all
We have a thin-client application written in powerbuilder with all the
processing (add,update,delete etc) in Sybase stored procedures. We are
currently porting this app to Oracle 8.1.6. We use the following syntax to
execute stored procs for sybase
Declare instance variables:
DECLARE ptKitAdd PROCEDURE FOR
@RC = p_KitAdd_p
@OrgId = :OrgId,
@ProductId = :ProductId,
@KitID = :is_kitid,
@Note = :is_notename,
@Letter = :is_letter,
@paper = :is_paper,
@inTS = :id_TS ;
In script for add button:
...
Executing oracle stored procedure from powerbuilderHi all
We have a thin-client application written in powerbuilder with all the
processing (add,update,delete etc) in Sybase stored procedures. We are
currently porting this app to Oracle 8.1.6. We use the following syntax to
execute stored procs for sybase
Declare instance variables:
DECLARE ptKitAdd PROCEDURE FOR
@RC = p_KitAdd_p
@OrgId = :OrgId,
@ProductId = :ProductId,
@KitID = :is_kitid,
@Note = :is_notename,
@Letter = :is_letter,
@paper = :is_paper,
@inTS = :id_TS ;
In script for add button:
...
ORACLE Stored Procedures in PowerBuilderI am trying to pass a dynamic procedure name and dynamic number of arguments
to a DECLARE and EXECUTE (procedurename) statement within Powerbuilder 6.5.
The name and number of arguments are stored on a table and they are
syntactically extracted into variables. Any suggestions?
...
Oracle store procedure problem using Powerbuilder and Oracle 8.0.4.0 NetPowerbuilder version 6.0.00 / 6.5 Build 444
Oracle Net 8.0.4.0
I found there is problem with Oracle store procedure having more than 6 in
parameters. I got GPF error on Window 95 and Dr. Watson error on NT.
Also, I found it works find in Oracle Net 8.0.3.0. Is this a bug? Is
there any new patch for this if it is a bug. Any recommendation about What
version Oracle Net or SQL Net should I used for Oracle server version
8.0.4.0 (I don't think I am using any Oracle 8 new features)?
Thanks in advance,
Sharon Li
If you use PB 6.5, you can try the new Oracle 8 driver:
ftp...
Executing Oracle stored functions from PowerBuilderI am trying to executing a stored function in Oracle (v7.3) from Powerbuilder
(v5.0). I am getting an error message stating PLS - 00201 : Identifier 'X'
must be declared
The execute statement is
EXECUTE SF_CALC(347, 'FIX', 10390, x, y)
I have declared x and y as int in Powerscript and as OUT parameters
in the stored function
The OS is Win 95
Any help is greatly appreciated
You need to use declare/execute/fetch:
integer arg_1, arg_3
string arg_2, arg_x, arg_y, return_value
DECLARE sf_calc PROCEDURE FOR sf_calc(:arg_1, :arg_2, :arg_3) USING SQLCA;
...
Execute stored procedure via PowerbuilderHi,
when I do "Select * From User_procedures;" I get all my
stored procedures in a list-view.
Then when I want to execute a stored procedure from that
list :
"EXECUTE SP_POST_ACTION_LIST_MESSAGES;"
I get an error : Line 3 - ORA-20003
Does anyone have a clue why I'm getting this and how I can
execute that stored procedure ?
Hey,
Now when I open the database via Powerbuilder, you can have
a look at the "Procedures & Functions".
I can't find my stored procedure in that list.
Executing a stored procedure from that list is no problem,
so ...
Powerbuilder-Oracle dynamic procedure execution (In OUT)How do I execute an Oracle 8i stored procedure which has IN OUT arguments in
powerbuilder 7.0.
I am using Declare, Prepare , Execute etc, since my requirement demands dynamic
execution.
It looks like PB considers IN OUT argument as just an OUT argument.
If the IN OUT arg is at the end of the stored procedure.
e.g. Proc1 ( Arg1 , Arg2 IN OUT).
I am able to execute the procedure as "execute Proc1 (?)".
If the IN OUT argument occurs in the middle like
Proc1 (arg1, arg2 IN OUT , arg2 ), I couldn't find a way to execute this
in PB.
"execute Proc1(?,?)", gives ...
Using Oracle Stored Procedures in PowerbuilderI need to populate a datawindow using an Oracle stored procedure. I went
through various faxline documents and found that the PBDBMS.put_line
option was not useful in my case, as I was going to return multiple
result sets based on cursor processing. I took the suggested option of
creating a package which had a stored procedure which was returning
various output variables of type table. The output variables correspond
to each column of the datawindow. I will have to define the procedure as
an RPC in the transaction object. I am having a problem with this. When
I go into Local external f...
problem in executing the stored procedure from powerbuilderi have a stored procedure in sybase as follows.
create procedure p_tes_update_open_seats @class_id int, @enroll_cnt int,
@ret_value int output
as
Declare @capacity int, @open_seats int
Select @capacity = capacity
From classes
Where class_id = @class_id
Select @open_seats = @capacity - @enroll_cnt
Update classes
Set open_seats = @open_seats
Where class_id = @class_id
if @@error !=0
Begin
Select @ret_value = -1
End
else
Begin
Select @ret_value = 1
End
i wanted to execute the above procedure, so i wrote like the code as follows in
powerbuilde...
Dynamically Executing DB2 stored procedure from powerbuilderHi,
I am trying to execute DB2 Stored Procedure using Dynamic SQL - Type 4
Statement. It throws me some error. Please find the code snippet below:-
(Note: Procedure Name, Parameter Name & Parameter Value and DataType are passed
at runtime)
When it executes the statement "EXECUTE DYNAMIC sp_execution USING DESCRIPTOR
SQLDA ;" from the below code. It throws the error "The value of Host variable in
the open or Execute statement cannot be used because of its datatype" which
means it says that the "Datatype of the parameter passed and the parameter
inside...
MS SQL Stored Procedure not executing properly from PowerbuilderHi
I have written a stored procedure in MS-SQL 7.0 which creates a copy of
existing database. When I execute the procedure from query analyser,
the procedure gets executed succesfully and a new database is created
using the parameters supplied to it.
I am calling this stored procedure from my PowerBuilder 7.0 application.
Here also, procedure gets executed without generating any error.
But the database does not get created. It is not visible thru SQL
Enterprise Manager. Therefore I can connect to this Database.
Interesting thing is that data files get created by procedure.
Am...
MS SQL Stored Procedure not executing properly from PowerbuilderHi
I have written a stored procedure in MS-SQL 7.0 which creates a copy of
existing database. When I execute the procedure from query analyser,
the procedure gets executed succesfully and a new database is created
using the parameters supplied to it.
I am calling this stored procedure from my PowerBuilder 7.0 application.
Here also, procedure gets executed without generating any error.
But the database does not get created. It is not visible thru SQL
Enterprise Manager. Therefore I can connect to this Database.
Interesting thing is that data files get created by procedure.
Am...
PowerBuilder 8 and Oracle 8 Stored Procedure DatawindowI worked many years with Sql Server and it was easy to do, but I don't
know how to do in Oracle:
How a Oracle 8 Stored Procedure can return to PowerBuilder 8 the result
of a query or a recordset (in Sql Server is as easy as put a select
sentence at the end of the procedure). I don't want to use temporary
tables for a concurrence issue.
Can anyone give me a help?
Thanks in advance,
Ra�l La Torre
You need a REF CURSOR. See enclosed datawindow examples.
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://www.pb9books.com
product ...
Stored Procedure called from PowerBuilder Fails to Execute CompletelyI'm calling a Store procedure in MS SQLServer 6.5 from PowerBuilder 5 using
the follwing call:
DECLARE sp_GenerateTargets PROCEDURE FOR up_GenerateDailyTargets
@as_tradeweek = :ls_tradeweek;
EXECUTE sp_GenerateTargets;
The SP uses a cursor to loop through code that looks for an existing row in
the DB based on specified criteria, updating the row if found or inserting
a new row if no row exists.
It runs as expected everytime when called from SQLServer but never
completes all interations through the cursor when called from PB.
Does anyon...