Where's your code to create the cmd object?
It should add a parameter named @CustomerID and set the appropriate value.
On Mon, 28 Mar 2005 21:08:57 -0000, sas0riza <[EMAIL PROTECTED]> wrote:
>
>
> I have the following error:
>
> ==========================
> Procedure 'GetCustomer' expects parameter '@CustomerId', which was
> not supplied.
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
>
> Exception Details: System.Data.SqlClient.SqlException:
> Procedure 'GetCustomer' expects parameter '@CustomerId', which was
> not supplied.
>
> Source Error:
>
> Line 19: cmd.CommandType = CommandType.StoredProcedure
> Line 20: adpt = New SqlDataAdapter(cmd)
> Line 21: adpt.Fill(ds, "Customers")
> Line 22: Session("Customers") = ds.Tables
> ("Customers").DefaultView
> Line 23:
>
> Source File: F:\3-28-05\Data11A.aspx Line: 21
>
> Stack Trace:
>
> [SqlException: Procedure 'GetCustomer' expects
> parameter '@CustomerId', which was not supplied.]
> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +635
>
> System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader
> (CommandBehavior behavior) +9
> System.Data.Common.DbDataAdapter.Fill(Object data, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior) +77
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
> srcTable) +36
> ASP.Data11A_aspx.Page_Load(Object sender, EventArgs e) in F:\3-28-
> 05\Data11A.aspx:21
> System.Web.UI.Control.OnLoad(EventArgs e) +55
> System.Web.UI.Control.LoadRecursive() +21
> System.Web.UI.Page.ProcessRequestMain() +718
>
> ======================================
>
> Am I missing a line??
>
> Thank you!
>
>
> Yahoo! Groups Links
>
>
>
>
>
--
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/