Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Sybase > How to enforce number of calling - called params be the same???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-07, 08:52
Musil David Musil David is offline
Registered User
 
Join Date: Sep 2006
Location: Czech Republic
Posts: 68
How to enforce number of calling - called params be the same???

Example:

One team

Quote:
create proc sp_get_dates( @date1 datetime, @date2, datetime )
as

...
... BODY of stored proc
...

return 0


Another team is creating stored proc that call sp_get_dates
But they expect 3 params!!!

Quote:
...
...
exec sp_get_dates @ld_date1, @ld_date2, @ld_date3
if ( @@error != 0 ) return @error

...
...


Problem: During completing and funkcionally test phase we don t get any error info! Code proceed and there is no message that number of calling-called don´t match!

What to do to enforce error if params number dont match?
Reply With Quote
  #2 (permalink)  
Old 12-02-07, 15:08
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 371
Are they creating the procedure with own id? Looks like there needs to be some kind of a development procedure you need to follow for your team.

However, you could query sysprocedures for duplicate names OR syscolumns for no. of parameters as an audit procedure.

sysprocedures contains one row for each procedure created.

syscolumns contains one row for every column in every table and view, and a row for each parameter in a procedure.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On