473,385 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SP Expects paramater not supplied error

I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexceptio n: Procedure or function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@InstructionsOp erator",
CType(multiPage.FindControl("txtInstructionsOperat or"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@InstructionsCu stomer",
CType(multiPage.FindControl("txtInstructionsCustom er"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Requ ired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Show ",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks
Jun 27 '08 #1
7 1333
The only thing I can think of off hand is the value is the wrong format.

One way to check, if this is a developer SQL install, is to stoke up
Profiler and see what command is being sent to SQL Server. That will show
you if the parameter is missing or just incorrect.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"Cirene" <ci****@nowhere.comwrote in message
news:ex**************@TK2MSFTNGP05.phx.gbl...
>I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexceptio n: Procedure or function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@InstructionsOp erator",
CType(multiPage.FindControl("txtInstructionsOperat or"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@InstructionsCu stomer",
CType(multiPage.FindControl("txtInstructionsCustom er"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Requ ired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Show ",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks

Jun 27 '08 #2
Never heard of that tool, but sounds good. Is there a way to see EXACTLY
which parameters are being passed into a stored proc using this tool?

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:BE**********************************@microsof t.com...
The only thing I can think of off hand is the value is the wrong format.

One way to check, if this is a developer SQL install, is to stoke up
Profiler and see what command is being sent to SQL Server. That will show
you if the parameter is missing or just incorrect.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"Cirene" <ci****@nowhere.comwrote in message
news:ex**************@TK2MSFTNGP05.phx.gbl...
>>I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexcepti on: Procedure or
function 'InsertCompany' expects parameter '@ApptPhone1Required', which
was not supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@InstructionsO perator",
CType(multiPage.FindControl("txtInstructionsOpera tor"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@InstructionsC ustomer",
CType(multiPage.FindControl("txtInstructionsCusto mer"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Req uired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Sho w",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks


Jun 27 '08 #3
check to see if the value you are passing in is null (or nothing) this will
give this error sometimes. I know that you should get a "not set to an
instance ... " because you are using find control", but other than you just
named the parameters wrong along the way this is all i can think of
--
Share The Knowledge. I need all the help I can get and so do you!
"Cirene" wrote:
I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexceptio n: Procedure or function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@InstructionsOp erator",
CType(multiPage.FindControl("txtInstructionsOperat or"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@InstructionsCu stomer",
CType(multiPage.FindControl("txtInstructionsCustom er"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Requ ired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Show ",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks
Jun 27 '08 #4
thanks - alot of the data webpages i do i have no code, just use the data
binding controls, etc...

so sometimes when i call a stored proc its hard to debug

this profiler things has caught my attention - wonder if it would tell me
all the PARAMS sent to the stored proc and EXACTLY what their values are

anyone have any insight????

thanks!!

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:AE**********************************@microsof t.com...
check to see if the value you are passing in is null (or nothing) this
will
give this error sometimes. I know that you should get a "not set to an
instance ... " because you are using find control", but other than you
just
named the parameters wrong along the way this is all i can think of
--
Share The Knowledge. I need all the help I can get and so do you!
"Cirene" wrote:
>I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexcepti on: Procedure or
function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@InstructionsO perator",
CType(multiPage.FindControl("txtInstructionsOpera tor"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@InstructionsC ustomer",
CType(multiPage.FindControl("txtInstructionsCusto mer"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Req uired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Sho w",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks

Jun 27 '08 #5
Response.Write all the parameter values, instead of calling the sproc

Jeff
"Cirene" <ci****@nowhere.comwrote in message
news:Ol****************@TK2MSFTNGP03.phx.gbl...
thanks - alot of the data webpages i do i have no code, just use the data
binding controls, etc...

so sometimes when i call a stored proc its hard to debug

this profiler things has caught my attention - wonder if it would tell me
all the PARAMS sent to the stored proc and EXACTLY what their values are

anyone have any insight????

thanks!!

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message
news:AE**********************************@microsof t.com...
>check to see if the value you are passing in is null (or nothing) this
will
give this error sometimes. I know that you should get a "not set to an
instance ... " because you are using find control", but other than you
just
named the parameters wrong along the way this is all i can think of
--
Share The Knowledge. I need all the help I can get and so do you!
"Cirene" wrote:
>>I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexcept ion: Procedure or
function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@Instructions Operator",
CType(multiPage.FindControl("txtInstructionsOper ator"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@Instructions Customer",
CType(multiPage.FindControl("txtInstructionsCust omer"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Re quired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Sh ow",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks


Jun 27 '08 #6
you mean go ahead and write code to add the param values manually?

"Jeff Dillon" <je********@hotmailremove.comwrote in message
news:%2******************@TK2MSFTNGP05.phx.gbl...
Response.Write all the parameter values, instead of calling the sproc

Jeff
"Cirene" <ci****@nowhere.comwrote in message
news:Ol****************@TK2MSFTNGP03.phx.gbl...
>thanks - alot of the data webpages i do i have no code, just use the data
binding controls, etc...

so sometimes when i call a stored proc its hard to debug

this profiler things has caught my attention - wonder if it would tell me
all the PARAMS sent to the stored proc and EXACTLY what their values are

anyone have any insight????

thanks!!

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message
news:AE**********************************@microso ft.com...
>>check to see if the value you are passing in is null (or nothing) this
will
give this error sometimes. I know that you should get a "not set to an
instance ... " because you are using find control", but other than you
just
named the parameters wrong along the way this is all i can think of
--
Share The Knowledge. I need all the help I can get and so do you!
"Cirene" wrote:

I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexcep tion: Procedure or
function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@Instruction sOperator",
CType(multiPage.FindControl("txtInstructionsOpe rator"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@Instruction sCustomer",
CType(multiPage.FindControl("txtInstructionsCus tomer"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1R equired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1S how",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.

Thanks



Jun 27 '08 #7
Yes, SQL Server Profiler can show the text of every command passed to the
server. It's an essential debugging and performance management tool. You can
copy any SQL statements that were passed into the server, and then run the
same command in SQL Manager so you can troubleshoot issues. However, there
is a bit of a learning curve getting it to display the info you want, and if
it's a busy server, getting it NOT to display all the other server
communication. Look in SQL's Books Online for usage info.

"Cirene" <ci****@nowhere.comwrote in message
news:Ol****************@TK2MSFTNGP03.phx.gbl...
thanks - alot of the data webpages i do i have no code, just use the data
binding controls, etc...

so sometimes when i call a stored proc its hard to debug

this profiler things has caught my attention - wonder if it would tell me
all the PARAMS sent to the stored proc and EXACTLY what their values are

anyone have any insight????

thanks!!

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message
news:AE**********************************@microsof t.com...
>check to see if the value you are passing in is null (or nothing) this
will
give this error sometimes. I know that you should get a "not set to an
instance ... " because you are using find control", but other than you
just
named the parameters wrong along the way this is all i can think of
--
Share The Knowledge. I need all the help I can get and so do you!
"Cirene" wrote:
>>I have a stored procedure named insertcompany.

I keep getting the error:
Sys.webforms.pagerequestmanagerservererrorexcept ion: Procedure or
function
'InsertCompany' expects parameter '@ApptPhone1Required', which was not
supplied.

But, I DID supply it along with all others.... (here's a snippet)

MyCommand.Parameters.AddWithValue("@Instructions Operator",
CType(multiPage.FindControl("txtInstructionsOper ator"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@Instructions Customer",
CType(multiPage.FindControl("txtInstructionsCust omer"), TextBox).Text)
MyCommand.Parameters.AddWithValue("@ApptPhone1Re quired",
CType(multiPage.FindControl("checkbox1"), CheckBox).Checked)
MyCommand.Parameters.AddWithValue("@ApptPhone1Sh ow",
CType(multiPage.FindControl("checkbox2"), CheckBox).Checked)

Any ideas what is wrong with this? The other params seem to work fine.
Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Senthil | last post by:
Hi, I created a stored procedure in the sql server. I try to insert a record from the aspx page. But I keep getting this error, "procedure expects parameter <@firstname>, which was not...
2
by: Max Adams | last post by:
Question about using delegates with a string paramater to return a ListViewItem object... All, I have a thread and I want this thread to post messages to the main GUI thread using a delegate....
2
by: Brad Wood | last post by:
I have a method that takes a ref string parameter. This is because it will be called in loops and most of the time it will not need to modify the paramater at all, so I preferred not to return a...
1
by: jfturcott | last post by:
Prepared statement '(@p1 int,@p2 tinyint,@p3 varchar(8000),@p4 varchar(8000),@p5 bit' expects parameter @p1, which was not supplied. I get the above error when trying to update a datagridview to...
0
by: Maneesh Agarwal | last post by:
I am trying to pass a parameter to dynamically populate drop down list. I am not able to pass the parameter from my .aspx file. Here is the grid view and related ObjectDataSource. In srcLocation, the...
5
by: Frank Jovi | last post by:
I am working on a website with ASP.NET 2.0 I started with a SQL database .mdf. After further discussions with my client, we decided to switch to an Access database. I created a Select query...
0
by: itamar82 | last post by:
I have a SP running on mssql server 2005. When I try to execute the SP through asp I receive back an error that the parameter @City is not supplied, although I clearly do supply it. Here is my...
7
by: roseple | last post by:
Hi, can anyone please help me why I got this error every I uploaded files. Error: Here is the code on the said warning message: # Gather all required data $name =...
4
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.