If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Checking Existence Of The Arguments To Stored Procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-03, 09:35
alex.collins alex.collins is offline
Registered User
 
Join Date: Nov 2003
Location: London
Posts: 2
Question Checking Existence Of The Arguments To Stored Procedure

I want to check to see if an argument has been defined in a procedure, it could take a default value, but I don't want to use this method since all values that if can take are valid values, there are no special values that it could be (e.g. null or -1).

Is there a function called, for example, isDefined(x) which I can use to check it one of the argument has been defined.
Reply With Quote
  #2 (permalink)  
Old 11-19-03, 09:43
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Checking Existence Of The Arguments To Stored Procedure

Quote:
Originally posted by alex.collins
I want to check to see if an argument has been defined in a procedure, it could take a default value, but I don't want to use this method since all values that if can take are valid values, there are no special values that it could be (e.g. null or -1).

Is there a function called, for example, isDefined(x) which I can use to check it one of the argument has been defined.
Hi,

Not, does not exist.

GUstavo.
Reply With Quote
  #3 (permalink)  
Old 11-19-03, 10:10
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
If you are on version 9.x you can overload functions and stored procedures. For example, you could have:

a(p1)
a(p1,p2)
a(p1,p2,p3)

The versions that get's called depends on the number of parameters that you pass.

This doesn't work if someone decides they want a(p1,p3).

My suggestion, slap your programmers and have them pass a token you can check.
__________________
Fred Prose
Reply With Quote
  #4 (permalink)  
Old 11-19-03, 10:30
alex.collins alex.collins is offline
Registered User
 
Join Date: Nov 2003
Location: London
Posts: 2
Ah, no..

I'm on 7.31 unfortunatly.
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On