E
Elizabeth
I'm new to asp.net, so I hope I can explain the problem clearly.
I am getting the following error message:
Server Error in '/apps/ecards' Application.
--------------------------------------------------------------------------------
Prepared statement '(@msgID int,@randomVar int)SELECT msgID, fromName,
fromEmail, to' expects parameter @msgID, 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: Prepared
statement '(@msgID int,@randomVar int)SELECT msgID, fromName,
fromEmail, to' expects parameter @msgID, which was not supplied.
Source Error:
Line 151:
Line 152: Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Line 153: SqlDataAdapter1.Fill(DataSet11)
Line 154: ToName.DataBind()
Line 155: FromName.DataBind()
Source File: C:\Program Files\Microsoft Content Management
Server\Server\exeres\applications\ecards\templates\show_ecards_flash_file.aspx.vb
Line: 153
Stack Trace:
[SqlException: Prepared statement '(@msgID int,@randomVar int)SELECT
msgID, fromName, fromEmail, to' expects parameter @msgID, which was
not supplied.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +643
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) +38
ecards.show_ecards_flash_file.Page_Load(Object sender, EventArgs e)
in C:\Program Files\Microsoft Content Management
Server\Server\exeres\applications\ecards\templates\show_ecards_flash_file.aspx.vb:153
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
---------------------------------------------------
@msgID is a parameter and its value is set by the querystring. I'm
binding values to literals to display information from the SQL
database. This is the page load code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
eCardSqlCmd().Parameters("@msgID").Value =
(Request.QueryString("m"))
eCardSqlCmd().Parameters("@randomVar").Value =
(Request.QueryString("r"))
SqlDataAdapter1.Fill(DataSet11)
ToName.DataBind()
FromName.DataBind()
ToEmail.DataBind()
FromEmail.DataBind()
cardID.DataBind()
message.DataBind()
End Sub
Does anyone have any suggestions as to what could be causing the
problem?
Thanks.
I am getting the following error message:
Server Error in '/apps/ecards' Application.
--------------------------------------------------------------------------------
Prepared statement '(@msgID int,@randomVar int)SELECT msgID, fromName,
fromEmail, to' expects parameter @msgID, 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: Prepared
statement '(@msgID int,@randomVar int)SELECT msgID, fromName,
fromEmail, to' expects parameter @msgID, which was not supplied.
Source Error:
Line 151:
Line 152: Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Line 153: SqlDataAdapter1.Fill(DataSet11)
Line 154: ToName.DataBind()
Line 155: FromName.DataBind()
Source File: C:\Program Files\Microsoft Content Management
Server\Server\exeres\applications\ecards\templates\show_ecards_flash_file.aspx.vb
Line: 153
Stack Trace:
[SqlException: Prepared statement '(@msgID int,@randomVar int)SELECT
msgID, fromName, fromEmail, to' expects parameter @msgID, which was
not supplied.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +643
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) +38
ecards.show_ecards_flash_file.Page_Load(Object sender, EventArgs e)
in C:\Program Files\Microsoft Content Management
Server\Server\exeres\applications\ecards\templates\show_ecards_flash_file.aspx.vb:153
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
---------------------------------------------------
@msgID is a parameter and its value is set by the querystring. I'm
binding values to literals to display information from the SQL
database. This is the page load code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
eCardSqlCmd().Parameters("@msgID").Value =
(Request.QueryString("m"))
eCardSqlCmd().Parameters("@randomVar").Value =
(Request.QueryString("r"))
SqlDataAdapter1.Fill(DataSet11)
ToName.DataBind()
FromName.DataBind()
ToEmail.DataBind()
FromEmail.DataBind()
cardID.DataBind()
message.DataBind()
End Sub
Does anyone have any suggestions as to what could be causing the
problem?
Thanks.