Whats stopping you just sending different parameters to a stored
procedure anyway and setting up constants in your vb prog for each
parameter?

e.g.
const parByNameAndPassword=1
const parByCategoryID=2
const parAll=0

sSQL="GetName " & parByNameAndPassword

and in TSQL

declare [GetName]
@parameter as int=0
as

if @parameter=1
begin
/* By name and password */
end
else
begin
        if @Parameter=2
                begin
                /* By categoryID */
                end
        else
                begin
                /* full */
                end
end

I agree though, in terms of data manipulation the SQL server side
scripting is going to be a boon.

-----Original Message-----
From: Anders Lundholm [mailto:[EMAIL PROTECTED]]
Sent: 09 September 2002 23:37
To: ActiveServerPages
Subject: Overloading stored procedures in SQL Server "Yukon"


Hello!

I was just wondering if some of you knew whether or now it will be
possible
to overload stored procedures in the upcoming release of SQL Server
codenamed "Yukon"?!

Microsoft has already announced support for e.g. C# as a language for
writing stored procedures. Imagine the help we'd get developing stored
procedures (structuring our naming conventions and so forth), if
overloading
would be possible?!

Instead of 3 stored procedures named like this

GetName
GetNameByNameAndPassword
GetNameByCategoryID

We could use the same name for all 3 stored procedures and simply
overload
when invoking them, depending upon the number or arguments in an
SqlCommand
object.

Sounds nice?! :-)

with regards
anders l. borum � [EMAIL PROTECTED]
the sphereworx / monoliner experience
--

And .NET changes the way we all build applications!


---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%



---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to