|
-
Calling a Stored Procedure
Hi I have developed a stored procedure in SQL7 that has 2 input parameters
and 2 output procedures. When I call it I keep geting an error that the driver
doesn't support the option feature. here is the text of the stored Proc:
CREATE PROCEDURE WB_Market_Share (@Start_Date datetime,
@End_Date datetime, @FastrakVol int OUTPUT, @TotalVol int OUTPUT) AS
-- Declare variables
DECLARE
@FT1 int,
@FT2 int,
@GL1 int,
@GL2 int,
@GL3 int,
@GL4 int
SELECT @FT1 = Sum(FT1Vo),@FT2 = Sum(FT2Vo),@GL1 = Sum(GL1Vo),@GL2 = Sum(GL2Vo),
@GL3 = Sum(GL3Vo),@GL4 = Sum(GL4Vo)
FROM tms_west
Where ([Date] between @Start_Date and @End_Date) AND (Location = 12.185)
select @FastrakVol = (@FT1 + @FT2)
select @TotalVol = (@FT1 + @FT2 + @GL1 + @GL2 + @GL3 + @GL4)
This is how I'm calling it:
adCommand.ActiveConnection = adConn
adCommand.CommandText = "WB_Market_Share"
adCommand.CommandType = adCmdStoredProc
adCommand.Parameters.Append _
adCommand.CreateParameter("Start_Date", adDate, adParamInput, , Start_Date)
adCommand.Parameters.Append _
adCommand.CreateParameter("End_Date", adDBDate, adParamInput, , End_date)
adCommand.Parameters.Append _
adCommand.CreateParameter("FastrakVol", adInteger, adParamOutput)
adCommand.Parameters.Append _
adCommand.CreateParameter("TotalVol", adInteger, adParamOutput)
adCommand.Execute
Text1 = adCommand.Parameters.Item("FastrakVol")
Text2 = adCommand.Parameters.Item("TotalVol")
Any Help would be greatly appreciated!
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks