problem in executing the stored procedure from powerbuilder

i 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
powerbuilder

DECLARE ls_update PROCEDURE FOR p_tes_update_open_seats
	@class_id = :ll_class_id, @enroll_cnt = :ll_enroll_cnt,
	@ret_value = :li_RetVal out USING sqlca ;
	
Messagebox ("li_RetVal1", li_RetVal)					  

	EXECUTE ls_update ;			

but the stored procedure is not getting executed.can anyone help me

thanks

andrew
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp
0
andrew
2/7/2001 8:34:09 PM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

1 Replies
785 Views

Similar Articles

[PageSpeed] 24

Is it that the procedure is not getting executed or that you are not 
getting back the output parameter?

If the latter, there are 2 ways to do this.  In your case, since you want 
the output parm and there is no result set, declare the proc as an RPC on 
an object of type transaction.  Then execute the RPC as a method call. Make 
sure the output parm is specified as being passed by reference in the 
RPCFunc declaration.

The second method uses the fact that PB will return the return value and 
all output parms in a second result set.  So, after executing the proc via 
embedded SQL as you did, fetch until SQLCode = 100 (or simply check if 
SQLCode = 100 after the execute statement.  Once SQLCode = 100, fetch once 
more to get the return value/output parms.

HTH,

steve
[TeamSybase]
0
Steve_Katz_
2/8/2001 2:16:56 PM
Reply:

Similar Artilces:

Executing oracle stored procedure in powerbuilder
Hi 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 procedures from powerbuilder
Hi 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: ...

Execute stored procedure via Powerbuilder
Hi, 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 ...

Executing oracle stored procedure from powerbuilder
Hi 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: ...

problem while running a stored procedure from powerbuilder
Hi, When I run a Sybase stored procedure from PowerBuilder, I get an error message as "'The parameter of type 111 did not have a valid value". What is this parameter type 111? Can anyone tell me the reason for this error and how should I resolve the same? Thanks, Nataraj PS: Sybase version is 12.5 and PowerBuilder version is 8.0.3 > Hi, > > When I run a Sybase stored procedure from PowerBuilder, I > get an error message as "'The parameter of type 111 did > not have a valid value". What is this parameter type 111? Type 111 is pro...

problem in executing stored preocedure from powerbuilder
hi i want to execute a stored procedure from powerbuilder.within that stored preocedure i am creating a temp table.i have the foll. code in PB to execute the stored procedure.but i get an error saying "The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database." can anybody help me with this issue.i have sqlca.autocommit = True in the application open event. DECLARE ls_terminate PROCEDURE FOR p_team_juna_empterminate @emp_num = :ls_emp_num, @termdate = :ldt_term_date, @update_date = :ldt_updt_date, @update_...

Problem with Returning a Value from a Stored Procedure to Powerbuilder
I am using Powerbuilder 6.5.1 and Sql Anywhere 6.0.3 I trying to call a Strored Procedure from within Powerbuilder.This procedure should return me a value to tell me if everything went ok in this procedure.The procedure runs but it does not return me a value back to powerbuiler. ----------------------------------------------- Here's a shorten ver of the Stored Procedure. ----------------------------------------------- Alter procedure DBA.Unbill_wkst(in d_invoice_id decimal(10),out s_ret_code char(3)) begin atomic Declare no_error exception for sqlstate value '00000...

Dynamically Executing DB2 stored procedure from powerbuilder
Hi, 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...

Problem calling DB2 stored procedure from PowerBuilder
I am trying to call a DB2 stored procedure written in Java from my PowerBuilder 8.0.3 app. (My version of UDB is 7.2 and it resides on an AIX box.) My stored proc accepts one input parameter and does not return a result set. The procedure runs fine from DB2 Stored Procedure Builder, but I have not been able to get it to work from PowerBuilder. I have tried several different ways of calling this stored proc, and none of them have worked. I have read everything I can find on the web about this, and I'm still not sure what I'm doing wrong. I have tried creating a user object o...

MS SQL Stored Procedure not executing properly from Powerbuilder
Hi 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...

Stored Procedure called from PowerBuilder Fails to Execute Completely
I'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...

MS SQL Stored Procedure not executing properly from Powerbuilder
Hi 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...

Problem Calling Store Procedure from Powerbuilder in PB/Jaguar architechture
----- Original Message ----- From: Naimesh Trivedi <naimesh@rajmicro.com> Newsgroups: sybase.public.easerver.powerbuilder Sent: Wednesday, August 15, 2001 3:13 PM Subject: Re: Calling Stored Procudure in 3-tier in Powerbuilder/JaguarCTS architechture > Hello Mark, > > Thanx for ur prompt response. Foll. error is coming > > Error ORA-24321 (Zero Iteration count) If done using sqlca syntax shown > below & Stored Procedure does not > execute or no row returns (the test sp inserts one row in one table - hard > coded for testing purpose) > &...

HELP! Direct execution of SQL in Powerbuilder vs using stored procedures
I'm debugging a powerbuilder process for my company but I unfortunately don't have much pb experience... Here's the facts: Powerbuilder 5.0 Microsoft SQL Server 6.5 on Windows NT 3.51 The program opens a cursor on a dataset and then loops through the rows. For each row it must interrogate the data and then perform some appropriate action upon the database. The dataset is approx 500,000 rows and the job is taking a very long time (60 hours +) to complete. My task is to reduce the execution time. I've noticed that the code is calling a function for each itera...

Web resources about - problem in executing the stored procedure from powerbuilder - sybase.powerbuilder.general

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 12/12/2015 7:30:15 PM