passing optional parameters to the parameters collection 
Author Message
 passing optional parameters to the parameters collection

How is this done via ado?  I want to pass the 1,2, and 4
variable to a stored procedure, but the 4th variable is
seen by ado as the 3rd.

1st

adInteger, adParamInput, 8, Param)
2nd

adVarChar, adParamInput, 255, sAdvMedia)
4th

adTinyInt, adParamInput, 2, 1)

Thanks in advance,
Todd



Sun, 18 Jan 2004 01:26:59 GMT  
 passing optional parameters to the parameters collection
The provider is simply passing your parameters in order, so they're seen as
#1, #2, and #3.  You'll need to create that 3rd parameter also in the
collection, even if you want its default value to be used and don't intend
to supply one, for the last parameter to be treated as #4.

MDAC 2.6 now also supports Named Parameters, please see Bill Vaughn's
article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsq...
html/NamedParameters.asp.



Sun, 18 Jan 2004 07:42:37 GMT  
 passing optional parameters to the parameters collection
Unless you use named parameters. (see earlier post in public.data.ado). This
is available in 2.6...

--
William (Bill) Vaughn
President Beta V Corporation
www.betav.com


Quote:
> The provider is simply passing your parameters in order, so they're seen
as
> #1, #2, and #3.  You'll need to create that 3rd parameter also in the
> collection, even if you want its default value to be used and don't intend
> to supply one, for the last parameter to be treated as #4.

> MDAC 2.6 now also supports Named Parameters, please see Bill Vaughn's
> article

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsq...
Quote:
> html/NamedParameters.asp.



Mon, 19 Jan 2004 08:12:54 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using Parameter Queries with Optional Parameters

2. > passing vb6 optional byref parameter into c#

3. Passing objects as Optional parameters

4. Passing Optional Parameters

5. Passing optional parameters from Visual Basic

6. How to change parameter order in parameter collection

7. passing parameter to a parameter query

8. Passing Parameters to stored parameter queries using VB 5's Data Controls

9. Max Number of Parameters In Parameter Passing

10. Max Number of Parameters In Parameter Passing

11. Writing A Function with optional parameters

12. how to declare a function with optional parameters

 

 
Powered by phpBB® Forum Software