[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Store Procedure problem

Asked by babak62 in Active Server Pages (ASP)

Please tell me what am I doing wrong here is my SP:
<%@ LANGUAGE=vbscript enablesessionstate=false LCID=1033 %>
<!--#include file="../Connections/newdiamonds.asp" -->
<%
Dim Command1__pf_id
Command1__pf_id = ""
if(Request("pf_id") <> "") then Command1__pf_id = Request("pf_id")

Dim Command1__item_id
Command1__item_id = ""
if(Request("item_id") <> "") then Command1__item_id = Request("item_id")

Dim Command1__name
Command1__name = ""
if(Request("name") <> "") then Command1__name = Request("name")

Dim Command1__description
Command1__description = ""
if(Request("description") <> "") then Command1__description = Request("description")

Dim Command1__list_price
Command1__list_price = ""
if(Request("list_price") <> "") then Command1__list_price = Request("list_price")

Dim Command1__image_file
Command1__image_file = ""
if(Request("image_file") <> "") then Command1__image_file = Request("image_file")

Dim Command1__cost_price
Command1__cost_price = ""
if(Request("cost_price") <> "") then Command1__cost_price = Request("cost_price")

Dim Command1__sale_price
Command1__sale_price = ""
if(Request("sale_price") <> "") then Command1__sale_price = Request("sale_price")

Dim Command1__sale_start
Command1__sale_start = ""
if(Request("sale_start") <> "") then Command1__sale_start = Request("sale_start")

Dim Command1__sale_end
Command1__sale_end = ""
if(Request("sale_end") <> "") then Command1__sale_end = Request("sale_end")

Dim Command1__status
Command1__status = ""
if(Request("status") <> "") then Command1__status = Request("status")

%>

<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_newdiamonds_STRING
Command1.CommandText = "dbo.DiamondsByProduct"
Command1.Parameters.Append Command1.CreateParameter("@RETURN_VALUE", 3, 4)
Command1.Parameters.Append Command1.CreateParameter("@pf_id", 200, 1,100,Command1__pf_id)
Command1.Parameters.Append Command1.CreateParameter("@item_id", 129, 1,2,Command1__item_id)
Command1.Parameters.Append Command1.CreateParameter("@name", 200, 1,255,Command1__name)
Command1.Parameters.Append Command1.CreateParameter("@description", 200, 1,255,Command1__description)
Command1.Parameters.Append Command1.CreateParameter("@list_price", 3, 1,4,Command1__list_price)
Command1.Parameters.Append Command1.CreateParameter("@image_file", 200, 1,255,Command1__image_file)
Command1.Parameters.Append Command1.CreateParameter("@cost_price", 3, 1,4,Command1__cost_price)
Command1.Parameters.Append Command1.CreateParameter("@sale_price", 3, 1,4,Command1__sale_price)
Command1.Parameters.Append Command1.CreateParameter("@sale_start", 135, 1,8,Command1__sale_start)
Command1.Parameters.Append Command1.CreateParameter("@sale_end", 135, 1,8,Command1__sale_end)
Command1.Parameters.Append Command1.CreateParameter("@status", 3, 1,4,Command1__status)
' Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_newdiamonds_STRING
Command1.CommandText = "dbo.DiamondByDepartment"
Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Parameters.Append Command1.CreateParameter("@RETURN_VALUE", 3, 4)
Command1.Parameters.Append Command1.CreateParameter("@pf_id", 200, 1,100,Command1__pf_id)

Command1.Parameters.Append Command1.CreateParameter("@dept_id", 3, 1,4,Command1__dept_id)

Dim Command1__dept_id
if Request("dept_id").Count <> 0 then
        for index = 1 to Request("dept_id").Count
            Command1.Parameters("@dept_id").Value = Request("dept_id")(index)
            Command1.Execute()
        next
end if

%>
and here is the error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'DiamondsByProduct' expects parameter '@pf_id', which was not supplied.

/manager/insertsp.asp, line 69

line 69 is reffering to the
Command1.Execute()
and I can print pf_id if I do the response.write thing.
Thanks
[+][-]07/16/04 06:17 PM, ID: 11573147Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/16/04 06:19 PM, ID: 11573151Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/16/04 08:25 PM, ID: 11573409Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: babak62
Participating Experts: 1
Solution Grade: A
 
[+][-]07/16/04 08:47 PM, ID: 11573469Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/18/04 11:12 AM, ID: 11833988Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/18/04 12:48 PM, ID: 11835033Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/18/04 12:54 PM, ID: 11835107Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/04 02:03 AM, ID: 11850226Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89