dbTalk Databases Forums  

srv_numparams() always returning 0?

comp.databases.sybase comp.databases.sybase


Discuss srv_numparams() always returning 0? in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jonas Jonsson
 
Posts: n/a

Default srv_numparams() always returning 0? - 01-08-2004 , 02:31 AM






Hi all.

I'm currently porting an application that used to run in a HP-UX
environment with Progress 8 and Sybase 11, now we're using Progress 9
and Sybase 12.5 ...
We have a problem with a shared library that we've made, lets call it
"xp_jj".
This little lib is loaded into the xpserver, and used to run fine, but
now it gets loaded, the execution start, but when I try to get the
number of arguments for the function with srv_numparams(*SRV_PROC,
*NumberOfParameters), NumberOfParameters is always 0.

The design of this little lib is very close to the example code of
xp_echo.c, that can be found on
http://manuals.sybase.com/onlinebook...46942;pt=47086

By the way, I get exactly the same error-message from this
example-application as from my own app .....

What is wrong here?

Best regards,
Jonas Jonsson

Reply With Quote
  #2  
Old   
Jonas Jonsson
 
Posts: n/a

Default Re: srv_numparams() always returning 0? - 01-08-2004 , 08:52 AM






Jonas.Jonsson (AT) alcesys (DOT) se (Jonas Jonsson) wrote in message news:<b6c802b.0401080031.3bd271ef (AT) posting (DOT) google.com>...
Quote:
Hi all.

[snip, snip]

What is wrong here?

Best regards,
Jonas Jonsson
And I searched a little more, and found out that the external
procedure must be added with a little more love than earlier

ie: create procedure xp_echo @data char(255) output as external name
"xp_echo"

Cheers!
/Jonas


Reply With Quote
  #3  
Old   
Neal
 
Posts: n/a

Default Re: srv_numparams() always returning 0? - 01-08-2004 , 10:15 AM



Hello,

Make sure you are on the latest EBF for ASE & Open Server 12.5.
There is a bug listed in the latest ASE cover letter:
CR 280073 : XP server returns incorrect results
-----------------------------------------------

Using an extended stored procedure (ESP) with parameters can result in
wrong data being send to XP server, or because of this, XP
server can return incorrect results.

This happens when there's no parameter declaration list in the ESP but
one or more parameters are supplied at execution time which, when sent
to XP Server causes incorrect results. CR 280073 fixes this problem by
silently ignoring all parameters supplied at execution time when the
parameter declaration list is empty.

Note that this fix does not cause any behavioral change when the
parameter declaration list in the ESP matches the parameters supplied
at execution time.

If you're using ESP without a parameter declaration list and you do
supply parameters at execution time, drop and recreate the ESP in ASE.
Make sure the parameter declaration list in the ESP matches the
parameter list supplied at execution time.

It is important that the installmaster script (instmstr on NT) is run
as described in the section "Running the installmaster Script" in the
technote at

http://my.sybase.com/detail?id=1013610

If this is not done, execution of any Sybase-supplied ESPs will fail with
a 25000 error "Invalid number of parameters", from XP Server.

If you need to revert to the ASE behaviour prior to CR 280073, you should
start ASE using the 523 traceflag.
-----------------------------------------------

If you are on the latest EBFs, I think you will need to
provide a little more information:
1) What is the definition of the stored procedure you
are trying to run?
2) What does your Open Server code look like?
3) You mention an error message, it would help if you
provided the error message.

Thanks,
Neal

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.