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 of type transaction,
defining the procedure as a local external function, and
calling it as a function from the user object. The error
that I am getting is "Error 21 - Bad runtime function
reference".

I have tried changing my procedure to return a result set
and using it as the source of a datawindow. When I try to
create the datawindow, I get the message "SQLSTATE = 42724.
[IBM][CLI Driver][DB2/6000] SQL4306N Java stored procedure
or user-defined function "DBADMIN.TESTRESULTSET", specific
name "TESTRESULTSET" could not call Java method
"testResultSet".

I have also tried using the DECLARE...EXECUTE method, and I
cannot even get my code to compile. I've tried putting the
procedure name in quotes, not in quotes, arguments in
parentheses, etc., and nothing seems to work.

Does anyone have any suggestions for me to try? I would
appreciate your help!

Thanks,
Shannon
0
Shannon
1/21/2004 4:29:57 PM
sybase.powerbuilder.database 9855 articles. 1 followers. Follow

1 Replies
699 Views

Similar Articles

[PageSpeed] 44

On 21 Jan 2004 08:29:57 -0800, Shannon wrote:

> 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 of type transaction,
> defining the procedure as a local external function, and
> calling it as a function from the user object. The error
> that I am getting is "Error 21 - Bad runtime function
> reference".
> 
> I have tried changing my procedure to return a result set
> and using it as the source of a datawindow. When I try to
> create the datawindow, I get the message "SQLSTATE = 42724.
> [IBM][CLI Driver][DB2/6000] SQL4306N Java stored procedure
> or user-defined function "DBADMIN.TESTRESULTSET", specific
> name "TESTRESULTSET" could not call Java method
> "testResultSet".
> 
> I have also tried using the DECLARE...EXECUTE method, and I
> cannot even get my code to compile. I've tried putting the
> procedure name in quotes, not in quotes, arguments in
> parentheses, etc., and nothing seems to work.
> 
> Does anyone have any suggestions for me to try? I would
> appreciate your help!
> 
> Thanks,
> Shannon

Hi

the only thing i can think of is to check if the method is 'public'
-- 
Regards
Manish
0
Manish
1/21/2004 9:27:16 PM
Reply:

Similar Artilces:

Calling a DB2 Stored Procedure From PowerBuilder
Is this possible? We have a stored procedure declared in DB2 on the mainframe and, I have no idea how I would go about calling this procedure. Any ideas/insight is appreciated. Thanks! >>Is this possible? We have a stored procedure declared in DB2 on the mainframe and, I have no idea how I would go about calling this procedure. Any ideas/insight is appreciated<< You can use the Sybase Direct Connect driver to connect to DB2. Once that is done, I would assume that you should be able to see and invoke the stored procs in the same way as with stored procs in any...

Powerbuilder and IBM DB2 Stored Procedure calls with OUTPUT
Good morning everyone, I am having an issue with a client that is using PB 10.5 and IBM DB2. I need to use a Stored Procedure on DB2 (Cobol stored procedure) but having troubles declaring it. In the Stored Procedure on IBM DB2: OUTPUT variables @PM-RETURN-CODE pic x(01) @PM-CUR-PRICE-STATUS pic x(01) @PM-CUR-EFF-DATE pic x(10) Powerbuilder compiler complains that these OUTPUT variables, when using a string local variable that the SQL is Invalid SQLSTATE=37000 IBM[CLI Driver] CLI0118E Invalid SQL Syntax SQLSTATE=37000 But if I...

Powerbuilder Crashes Calling DB2 Stored Procedure with parms
Hi can anybody assist me? GPF occurs when creating Datawindow when calling DB2 Stored Procedure with parms. I am currently running PB 8.0.1 connecting to DB2 version 7.1 I am trying to create a datawindow based on an existing stored procedure. The sp definately works as I have run it successfully in the db2 command line which doesn't use ODBC, and in Access via a pass through query which uses the same ODBC as PB. The sp has just one argument, which I hardcode the value in the syntax. The argument name is 'inFund'. The syntax is as follows: {call sp.r_rs_000...

Powerbuilder crashing when Calling DB2 Stored Procedure with parms
Hi can anybody assist me? GPF occurs when creating Datawindow when calling DB2 Stored Procedure with parms. I am currently running PB 8.0.1 connecting to DB2 version 7.1 I am trying to create a datawindow based on an existing stored procedure. The sp definately works as I have run it successfully in the db2 command line which doesn't use ODBC, and in Access via a pass through query which uses the same ODBC as PB. The sp has just one argument, which I hardcode the value in the syntax. The argument name is 'inFund'. The syntax is as follows: {call sp.r_rs_0000...

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) > &...

DB2 V4 STORED STORED PROCEDURE AND POWERBUILDER
I have finally been able to call a stored procedure written in cobol from powerbuilder 6. But I still got some problem . The call will work only if I initialize the output parameter to space (80) because the output parameter of the stored procedure is char(80) . Here is a sample that works. string ls_literal_OUTMSGF string ls_literal_RQT Ls_literal_RQT = 'I' ls_literal_OUTMSGF = space(80) SQLCA.TESTPROC (ls_literal_RQT, ls_literal_OUTMSGF ) If I initialize the output variable like the following statements. It bombs.(communication error) setnull ( ls_literal_OUTMSGF...

Calling stored procedure from powerbuilder
I have a work flow type stored procedure that dynamically executes other stored procedures. When it run from the back end (SQL Server 2000) it completes with out errors. When it runs from powerbuilder using a datastore it behaves differently =96 it does not complete all the procedures but returns with out any error. Aside of using a debugger that can steps through store procedures which are called from a client are there some things that can be checked first? Can anyone recommend such tool? Thanks, Alon Thanks, Alon. If you have Visual C++, it will allow you to ...

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 powerbuilde...

Powerbuilder to IBM DB2 Stored Procedures
Hi, I have set up a stored procedure on the mainframe using cobol le and db2. When I try to create the datawindow using stored procedure as the data source in powerbuilder I receive the message "Requested result set number 1 not found". I am not sure what I am doing wrong to get this message. If someone has done this technique with powerbuilder and DB2 on the mainframe, any help is appreciated. Thanks, Chris Edwards Saks Incorporated 331 W. Wisconsin Ave Milwaukee, WI 53203 (414) 423-6702 PowerBuilder is being told by the ODBC driver that the result set c...

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 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...

call as400 stored procedure with powerbuilder 9
hi to all. I have a program that calls 36000 times a stored procedure in as400. the program crash at 32987 call. I must terminate my application. someone can tell me why? there is a max number of calls for as400 in pb transaction object? I'm using pb 9. thanks. MK. what's the data type of the counter in your loop? Are you getting an error message with the crash, and if so, what is it? "mk" <mk@csteam.com> wrote in message news:448eb196$1@forums-2-dub... > hi to all. > I have a program that calls 36000 times a stored procedure in as400. the &g...

PowerBuilder DB2 Remote Procedure Call (RPC) failure
We are trying to call a DB2 procedure via a Remote Procedure Call (RPC) in a remote object running under EA Server. Everything appears to work, except when we make the actual call, when we get the following error: "Runtime Error in PB Component: Database Interface does not support Remote Procedure Calls" We appear to be missing the remote procedure call library or something from IBM. Anybody else ever run into this? Thanks in advance! ...

Web resources about - Problem calling DB2 stored procedure from PowerBuilder - sybase.powerbuilder.database

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: 11/22/2015 8:06:03 PM