Running Stored procedures from PowerBuilder

powerBuilder 9 and Sybase 9.0.2.3534

When we execute a stored procedure from a data window
PowerBuilder is using Exec instead of Call which is causing
an error during runtime. I know both Exec and Call can be
used in SQL Anywhere 9.0.2.3534, however Exec needs to
execute without parenthesis and Call with Parenthesis to be
successful. Is there a setting or something in Powerbuilder
to ensure the execute statements are being built correctly?

Thanks
0
Herman
3/22/2010 3:34:55 AM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

2 Replies
427 Views

Similar Articles

[PageSpeed] 34

You may need to repost to the Powerbuilder newsgroups
to get at the accurate specifics of how to fix this ... but ....

I suspect the problem is PB9 just does not know about
SQL Anywhere 9.

I don't have an installed version of PB <any version>
to look at this but you may find you only need to
adjust something in the ODBC helper dll.  I believe that
file was calll

    PBODBm90.ini

Copying the

    [Adaptive Server Anywhere 7]

or higher section  (whatever it's real name is) and changing
the '7' to be a '9' may be all there is to this.

If I am correct on that, PB9 will now wake-up knowing the
correct syntax.

Another possibility would be the 'call-procedure' section
{however that is specified in the .ini file} has been damaged.
If that is the case it may just need to be reinstalled or fixed.





"Herman Miller" wrote in message news:4ba6e55f.5786.1681692777@sybase.com...
> powerBuilder 9 and Sybase 9.0.2.3534
>
> When we execute a stored procedure from a data window
> PowerBuilder is using Exec instead of Call which is causing
> an error during runtime. I know both Exec and Call can be
> used in SQL Anywhere 9.0.2.3534, however Exec needs to
> execute without parenthesis and Call with Parenthesis to be
> successful. Is there a setting or something in Powerbuilder
> to ensure the execute statements are being built correctly?
>
> Thanks 

0
Nick
3/22/2010 3:55:38 PM
The PB syntax for stored procedure calls, no matter what the backend 
database, should be:

execute sp_procname;num arg1 = :arg1, arg2 = :arg2..., argn =:argn

For ODBC, the CallEscape DBParm is the only option that changes the 
format of the call. However, it should not cause the call to have 
parenthesis added to the EXECUTE call.

I assume that this is painted datawindow with a SP as a source and not a 
syntax based datawindow i.e., PB will use the syntax specified in the 
later case without modification. What does a PB trace show? a SQL 
Anywhere request log (SQL) show?

-chris


On 22/03/2010 11:55 AM, Nick Elson [Sybase iAnywhere] wrote:
>
> Another possibility would be the 'call-procedure' section
> {however that is specified in the .ini file} has been damaged.
> If that is the case it may just need to be reinstalled or fixed.

0
Chris
3/22/2010 4:29:05 PM
Reply:

Similar Artilces:

Running stored procedure within a stored procedure
I have a custom built users table for storing some values and I am also utilizing the aspnet_Users table. I want to delete a user from my users tables then execute the aspnet_Users_DeleteUser sproc and pass into the stored procedure the username of the user to delete because the DeleteUser method requires this. When I execute the command from within my asp.net web application I get the exception below. Both values are being obtained from the asp.net application and are represented in my DAL that is also below. Any thoughts as to why I am receiving this exception? Thanks. Procedure or functi...

Running a stored procedure within a stored procedure
I have a stored procedure (A), which I need to call from another stored procedure (B). The data pulled from (B) is then inserted into a temporary table. The problem I am having is the stored procedure is in a loop, and it only runs once. I need it to run each time the statement loops. For example: In the cursor I have, there are 3 rows, so the statement should return 3 rows. However, only 1 row is returned, it looks like the stored procedure is only one once. What do I have to do to get it to loop?? DECLARE dCURSOR CURSOR FOR select ID, value1, value2 from table; OPEN dCU...

stored procedure. The c# code run stored procedure.
 CREATE PROCEDURE GetThreadMessages @iThreadID int AS SELECT message_id, thread_id, user_id, first_names, last_name, email, subject, body, date_submitted, category_name, category_id, last_edited FROM message_view WHERE thread_id = @iThreadID ORDER BY date_submitted asc For update ---------------------------------------------------------------------------------------- CREATE PROCEDURE UpdateThreadMessages @iThreadID int @name varchar(50) AS UPDATE message_view SET first_names = @name FROM message_view ...

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

Run SYSTEM stored procedures from PowerBuilder
I need to run SYSTEM stored procedures, such as sp_addlogin , sp_password, etc. within powerbuilder. Does anybody know how to do it? I am using Sybase DBMS and Powerbuilder 7.0. I tried the following: DECLARE sp_addlogin PROCEDURE FOR sp_addlogin @loginame = :as_username , @passwd = :as_password , @defdb = 'master' , @deflanguage = 'us_english' , @fullname = :as_fullname USING sqlca; EXECUTE sp_addlogin ; It gave me an error: sqlcode = -1 sqldbcode = 17260 sqlerrtext = "can't run sp_addlogin from within a transaction&quo...

Error trying to run a stored procedure from within powerbuilder
I am trying to run a stored procedure from within powerbuilder. I am getting the following error: SQLSTATE = S1000 [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt Powerbuilder 7.0.3 Build 10047 MSSQL 7.0 ODBC connection THanks for any help....this is a major problem. This error means that the transaction object your are using for the sp call is currently in the middle of processing something else and hasn't concluded it's conversation with the database. For example, if you have a cursor open and for each row in the cursor...

Calling a stored procedure inside another stored procedure (or "nested stored procedures")
Hi all - I'm trying to optimized my stored procedures to be a bit easier to maintain, and am sure this is possible, not am very unclear on the syntax to doing this correctly.  For example, I have a simple stored procedure that takes a string as a parameter, and returns its resolved index that corresponds to a record in my database. ie exec dbo.DeriveStatusID 'Created' returns an int value as 1 (performed by "SELECT statusID FROM statusList WHERE statusName= 'Created')  but I also have a second stored procedure that needs to make reference to&n...

Running a stored procedure and running out of memory problem.
Hi, I'm looking for some guidance with a problem I'm having with a stored procedure and running out of memory. ASA ver 8.0.2.4122 What I'm trying to figure out is what elements within a stored procedure could eat up the memory if done a repeated number of times or does my stored procedure fail because my system lacks the appropriate amount of memory to do the job. I have a stored procedure that loops around based on the number of records in a cursor, performs 'selects' within the loop to find other data based on the cursor data, performs some calculations and ...

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

How to run a sql stored in a variable inside a stored procedure ?
Hi, I am having a situation that needs a sql to be run in a stored procedure, stored in a local variable. Basically the where clause is constructed based on certain criteria. If anybody knows a workaround for this please let me know. Thanks in advance Ganesh Salem After adding your servername to sysservers database and creating a remote account, you can use remote procedure calls to the same server itself. For more information on creating a remote user account and adding your servername to sysservers system table please see your software documentation. Gokhan DEMIR ...

Execute stored procedure from stored procedure
Hello,i need to execute a stored procedure from another stored procedure. For example:StoredProcedure1: Returns a table with columns "year" and "value".StoredProcedure2: Also returns a table with columns "year" and "value".In Stored Procedure3: I would like to use the results from StoredProcedure1 and StoredProcedure2 and join them. Can somebody give me an example how to execute a stored procedure from another one and use the result table for a new command?Kind regards and thanks,carsaw hi,first off all let me clarify here - you cannot return ta...

Calling a Stored Procedure from a Stored Procedure
Can you do this? I have a sp that returns a list of eligible accounts and then I use that list in other sp but I don't want to keep copying the code, I would like to be able to use it as a sub query in other sp but I don't know if this is possible or what the syntax would be. Thanks, Aaron You cannot do that directly. You can: 1. Use User defined functions which can return a resultset 2. Use a local #temp table which can hold the resultset of the called stored procedure and use this #temp table in your subsequent processing INSERT #tempTable EXEC s...

calling a stored procedure from a stored procedure
Hi Group! I'm on ASA 8.02 Build 4411 writing sprocs in WATCOM SQL. I have a sproc which breaks a given string-parameter into pieces. It's result set contains the pieces, e.g. last line of sproc: "select item from mytable;". This sproc works fine. Now I need to call this procedure from another procedure which has a variable result set. I tried the following: <snip... set ll_retval = 0; call sp_breakstring(as_bzp,','); BreakLoop: while ll_retval <> 100 and not ll_retval < 0 loop set li_zaehler = li_zaehler + 1; fetch next sp_breakstrin...

Why running stored procedure piece by piece is much faster than running it as a whole
I have encountered a very strange problem in writing a stored procedure. Here is what happened. I wrote a lengthy stored procedure and it will take approximately 2 minutes to finish running this procedure. In order to figure out why this procedure is slow, I copy all the codes into SQL Advantage, break it into 2 pieces and run it piece by piece. Surprisingly first piece finishes within 5 seconds, and second piece finishes within 10 seconds. I then run these two pieces together, and it will still take approximately 2 minutes to finish. Can anyone tell me how this can happen? ...

how to run the store procedure??
create procedure dayend_undo as declare @settle_date datetime , @trade_date datetime , @prev_date datetime select @trade_date = trade_date, @settle_date = settle_date from system_master where sys_code = 'SECURIT' delete client_balance where month_end = @trade_date delete client_inventory where month_end = @trade_date delete depot_inventory where convert(char(8), month_end, 112) = convert(char(8), @trade_date , 112) delete client_holding where month_end = @trade_date delete settle_detail wh...

How to run a stored procedure?
I have created a stored procedure, and I wonder how I can run this on my web site:ALTER PROCEDURE [dbo].[getPersons]AS     BEGIN         select  firstname, lastname        from    dbo.Persons        order by firstname        FOR     XML PATH('person'),                    ROOT('persons')...

Running stored procedures
Hi all, This is probably a dumb question, but how do I run stored procedures = with the DBI? I am using DBD::ODBC. Regards, Javier Moreno On Tue, 1 Mar 2005 11:49:40 -0600, Moreno, Javier <JavierMoreno@eaton.com> wrote: > Hi all, > > This is probably a dumb question, but how do I run stored procedures with the DBI? I am using DBD::ODBC. > my $dbh = DBI->connect("dbi:ODBC:server", 'name', 'password'); my $query = "exec spTest "; my $sth = $dbh->prepare($query); $sth->execute(); my $d = $sth->fetchrow_a...

Running a stored procedure
I am new to DBI and have been trying to find an example of running a stored procedure in MS-SQL. I have a simple search stored procedure that I need to pass keywords to and receive a recordset back from. Would anyone mind terribly giving any examples? I'd appreciate the help, the DBI docs just say "Calling stored procedures is currently not defined by the DBI", but I know it can be done! ______________________________________ splehP ttocS rotartsinimdA smetsyS TN secivreS tenretnI renroKbeW moc.renrokbew@pttocs moc.renrokbew.www $a="@ARGV";while($a){...

Call stored procedure from another stored procedure?
How do I call this stored procedure: CREATE Procedure hentSpecialPris ( @varenr int, @cvr int, @pris decimal(7,2) OUTPUT ) AS DECLARE @antal int SET @antal = 0 SET @antal = (SELECT COUNT(*) FROM rabat WHERE varenr=@varenr and cvr = @cvr) IF @antal < 1 BEGIN SET @pris = (SELECT pris FROM vare WHERE varenr=@varenr) END ELSE BEGIN SET @pris = (SELECT pris FROM rabat WHERE varenr=@varenr and cvr = @cvr) END GO from another stored procedure?? I want to get the output value of the stored procedure? ...

Calling Stored Procedure fromanother Stored Procedure
Hi,I am getting error when I try to call a stored procedure from another. I would appreciate if someone could give some example.My first Stored Procedure has the following input output parameters:ALTER PROCEDURE dbo.FixedCharges @InvoiceNo int,@InvoiceDate smalldatetime,@TotalOut decimal(8,2) outputAS .... I have tried using the following statement to call it from another stored procedure within the same SQLExpress database. It is giving me error near CALL.CALL FixedCharges (@InvoiceNo,@InvoiceDate,@TotalOut )Many thanks in advanceJames I believe you want to use 'EXEC' abad...

how to call stored procedure from another stored procedure?
is it possible to call a stored procedure from another stored procedure?-keeara g------------------ Inside your first Stored Procedure: exec <name of SP to run> <Eventual Parameters this SP requires> Here is a link to all you want to know about executing SPs from other SPs. You can even Execute SPs on other SQL Servers.RegardsAndre Colbiornsen ---------------------------------Seventh DayRåbygatan 1A,SE-223 61 LundSwedenMob.: +46-(0)708-97 78 79Mail: info@seventhday.se--------------------------------...

Calling a stored procedure from another stored procedure
Hello, I am now using Interbase again for a project and I am trying to do this: begin /* Procedure Text */ /* Steps: - Verify if protocol exists and fetch protocol id - add activity - add document - add activity protocol reeturn document id */ select id from protocols where protocols.protname = :protocol into :protid; /* protocol exists? Gooooood! */ if ( :protid is not null ) then begin execute addactivity(:userid,'New document') returning_values :actid; execute adddocument( :docname,:docpath...

Call as stored procedure from another stored procedure
I am using a stored procedure (SP_A) to insert rows to a table. This is done by the cursor within the procedure. Value for one of the column is provided by SP_B. My problem is that when i call SP_B in SP_A it does not return any value (rather i do not know how to capture it from SP_A). If executed individually it returns a value. Please help with example if something specific needs to be taken care. Suresh wrote: > > Please help with example if something specific needs to be > taken care. Please always post the version and build number of ASA that you are using (e....

Calling stored procedure from another stored procedure
Is it possible to call one sp from another sp?I've been hunting around for an example to do this and just can't seem to find one.Anyone have a link for this or a sample?Thanks all,Zath Yes, you can. Just use EXEC usp_secondStoredProc @params inside your first SP.Nick...

Web resources about - Running Stored procedures from PowerBuilder - sybase.sqlanywhere.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: 2/17/2016 10:32:43 AM