Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 20th, 2009, 03:47 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Question Not getting the return values

I am not getting any value returned from the call to the stored procedure.


Code:
 
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@Member", Data.SqlDbType.Char, 10)).Value = ViewState("FileMember")
mySqlCommand.Parameters("@Member").Direction = Data.ParameterDirection.Input
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@RetValue", Data.SqlDbType.Char, 200)).Direction = Data.ParameterDirection.Output
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@RowCount", Data.SqlDbType.Char, 2)).Direction = Data.ParameterDirection.Output
 
mySqlCommand.CommandType = Data.CommandType.StoredProcedure
mySqlCommand.CommandText = ("sp_ZyTax_Summary")
mySqlCommand.Connection = mySqlConnection
mySqlDataAdapter.SelectCommand = mySqlCommand
 
Dim myReturnValue As String = mySqlCommand.Parameters("@RetValue").Value.ToString 
Dim myRowCount As String = mySqlCommand.Parameters("@RowCount").Value.ToString

Code:
 
ALTER PROCEDURE [dbo].[sp_ZyTax_Summary] 
@Member varchar(10),
@RetValue char(200) output,
@RowCount char(2) output
as..........
 
Old May 20th, 2009, 05:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

AT least in you code, you never execute the SP...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
The Following User Says Thank You to gbianchi For This Useful Post:
snufse (May 21st, 2009)
 
Old May 21st, 2009, 08:23 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Good catch. Thank you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using DoCmd.RunSQL to return values jscully Access VBA 10 August 21st, 2017 12:58 PM
get the values of form field values crmpicco Perl 2 March 16th, 2007 10:57 AM
Return ASCII values for a given string sal C# 1 May 19th, 2005 03:59 PM
loop values and text box values move mateenmohd Classic ASP Basics 2 April 5th, 2005 11:33 PM
Multiple Return Values Colonel Angus SQL Server 2000 2 June 2nd, 2004 09:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.