Re: Need help in Optional keyword

Jesse Sanders <[email protected]> Thu, 25 Jul 2002 08:59:54 -0600
Newsgroups gmane.comp.windows.devel.vbcom
Message-ID <[email protected]>
Mark,

If your application is a single user app, where all components run on one
machine, it wont be a big deal.  If your application is multi-user and
distributed across multiple machines, using variants is out of the question.
  As you already know, variants are gone from .NET as well.  If your app is
going to be distributed then I would strongly recommend that you reconsider.
  If not, then who cares... it will never be an issue.

HTH,

Jesse


>From: Mark Burns <[email protected]>
>Reply-To: Technical discussion of VBCOM <[email protected]>
>To: [email protected]
>Subject: Re: [VBCOM] Need help in Optional keyword
>Date: Mon, 22 Jul 2002 11:58:38 -0400
>
>Jesse,
>
>I gotta go with Andrew with this one.
>Using variant optional parameters and ismissing() is the only way to
>ascertain whether the parameter was passed in or not. With your
>suggested method how would you ever be able to tell whether or not the
>vbNullString value was actually supplied in the method/function/sub call
>or not? No how/no way to do it.
>
>Now as to how to reconcile the desire to be able to use ismissing with
>the strong desire to avoid use variants... It's one 'o those
>irresistable force/immovable object conundrums.
>
>Regards,
>- Mark
>
>
> > -----Original Message-----
> > From: Technical discussion of VBCOM
> > [mailto:[email protected]] On Behalf Of Jesse Sanders
> > Sent: Monday, July 22, 2002 10:28 AM
> > To: [email protected]
> > Subject: Re: [VBCOM] Need help in Optional keyword
> >
> >
> > Set default values for your optional parameters and check to
> > see if they are
> > still set to the default....
> >
> > i.e., byval optional strConnString as string = vbnullstring
> >
> > if strConnString = vbNullString then
> >     '-- No conn string was passed in
> > else
> >     '-  Do whatever
> > end if
> >
> > HTH,
> >
> > Jesse
> >
> >
> >
> > >From: "P. S. Manikandan" <[email protected]>
> > >Reply-To: Technical discussion of VBCOM <[email protected]>
> > >To: [email protected]
> > >Subject: [VBCOM] Need help in Optional keyword
> > >Date: Fri, 19 Jul 2002 01:16:35 -0700
> > >
> > >Hi...
> > >          I have one function with three parameters. First one is
> > >mandatory , second and third parameters are optional. Now i
> > want to find
> > >out whether value is passed for the optional parameters or
> > not...how can i
> > >do this...any suggestions..
> > >
> > >Regards
> > >Manikandan
> > >
> > >You can read messages from the VBCOM archive, unsubscribe
> > from VBCOM, or
> > >subscribe to other DevelopMentor lists at http://discuss.develop.com.
> >
> >
> > _________________________________________________________________
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
> > You can read messages from the VBCOM archive, unsubscribe
> > from VBCOM, or
> > subscribe to other DevelopMentor lists at http://discuss.develop.com.
> >
> >
>
>You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
>subscribe to other DevelopMentor lists at http://discuss.develop.com.

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.