Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Closed Points: 250 Time: 14:19 - Jan 08, 2009  

san

Microsoft OLE DB Provider for SQL Server error '80040e10'

Hello Experts:

Im using the following code to pass the problemstatusID to to the next page so I can use this information:

<td><a href="problemdetails.asp?ProblemStatusID=" & Server.HTMLEncode(cdblProblemStatusID) & ""><%Response.Write("Edit")%></a></td>

And using the following code to extract the information:

ProblemStatusID=Request.QueryString("ProblemStatusID")

Whenever I click on the Edit button I am getting error message

"Microsoft OLE DB Provider for SQL Server error '80040e10'

Procedure or function 'GetInformationForProblemStatusId' expects parameter '@problemStatusId', which was not supplied.

/helpdesk/test/problemdetails.asp, line 32 "

This question is,I am not sure why I am getting this error message Can anybody help me regarding this issue or anybody has any other idea to the form using this technique?

Thanks
SAN

Here is the code and the stored procedure I am using

ALTER Proc [dbo].[GetAllOpenProblems]
As
Select a.ProblemStatusId,a.ProblemStatus,b.TeamMemberName,c.problemTitle,e.DepartmentN
ame
From (((ProblemsUsersDeptsReps d
Inner Join Departments e
on d.DepartmentID = e.DepartmentID)
Inner Join Problems c
on d.ProblemID = c.ProblemID)
Inner Join ProblemStatus a
on d.ProblemsUsersDeptsRepsID = a.ProblemsUsersDeptsRepsID)
Inner Join TeamMembers b
on a.TeamMemberId = b.TeamMemberId
Where UPPER(a.ProblemStatus) = 'OPEN'
_________________________________________________________

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<!--#include virtual="/helpdesk/Test/connection.asp" -->
<body>


<%
Dim strSQL, result


' Set SQL statement
strSQL = "GetAllOpenProblems"

'Execute teh SQL and obtain resultset

Set result = objconn.Execute(strsql)

'Check for Errors

If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
%>
<h3 align="center"> <%Response.Write("The following Tickets are opened today")%></h3>


<table width="90%" border="1" cellspacing="3" cellpadding="3" align="center">
<tr bgcolor="#CCCCCC" bordercolor="#999999"><th><%Response.Write("Problem ID")%></th>
<th><%Response.Write("Team Member Name")%></th>
<th><%Response.Write("Subject")%></th>
<th><%Response.Write("Component")%></th>
<th><%Response.Write("Status of the Problem")%></th>
<th><%Response.write("Edit")%></th></tr>

<%Do Until result.EOF%>
<tr><td><%Response.write(" " & result("ProblemStatusID") & " ")%></td>
<td><%Response.write(" " & result("TeamMemberName") & " ")%></td>
<td><%Response.write(" " & result("ProblemTitle") & " ")%></td>
<td><%Response.write(" " & result("DepartmentName") & " ")%></td>
<td><%Response.write(" " & result("ProblemStatus") & " ")%></td>
<%ProblemStatusID=Request.QueryString("ProblemStatusID") %>


<td><a href="problemdetails.asp?ProblemStatusID=" & Server.HTMLEncode(cdblProblemStatusID) & ""><%Response.Write("Edit")%></a></td>
</tr>
<%
result.MoveNext
loop
End If
'Close Database
'
objconn.Close
%>

</table>

</body>
</html>
-------------------------------------------------------

<%@ LANGUAGE="VBScript" %>
<%
Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">



<!--#include virtual="helpdesk/Test/connection.asp" -->


<head>
<title>ProblemDetails</title>
<link rel="stylesheet" type="text/css" href="../default.css">
<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusID") %>
<%
Dim strSQL, result


' Set SQL statement
strSQL = "GetInformationForProblemStatusId"

'Execute the SQL and obtain resultset

Set result = objconn.Execute(strsql)

'Check for Errors

If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else

result.MoveNext

End If
'Close Database
'
objconn.Close
%>
</head>
<body>

<table Class="Normal">
<tr>
<td colspan="2" align="right">
</td>
</tr>
<tr class="Head1">
<td colspan="2">
DetailsforProblem
</td>
</tr>
<tr class="Body1">
<td colspan="2">
<table class="Normal" border="0" cellspacing="0">
<tr>
<td width="125" valign="top">
<b>ProblemID:</b>
</td>
<td>
<%Response.write(" " & result("ProblemStatusID") & " ")%>
</td>
</tr>
<tr>
<td>
<b>UserName</b>
</td>
<td>
<%Response.write(" " & result("UserName") & " ")%>
</td>
</tr>
<tr>
<td>
<b>EMail:</b>
</td>
<td>
<%Response.write(" " & result("Email") & " ")%>
</td>
</tr>

<tr>
<td>
<b>Location:</b>
</td>
<td>
<%Response.write(" " & result("Location") & " ")%>
</td>
</tr>
<tr>
<td>
<b>Phone</b>
</td>
<td>
<%Response.write(" " & result("Phone") & " ")%>
</td>
</tr>
<tr>
<td>
<b>Component:</b>
</td>
<td>
<%Response.write(" " & result("DepartmentName") & " ")%>
</td>
</tr>
<tr>
<td>
<b>NH</b>
</td>
<td>
<%Response.write(" " & result("NH") & " ")%>
</td>
</tr>

<tr>
<td>
<b>SSN:</b>
</td>
<td>
<%Response.write(" " & result("SSN") & " ")%>
</td>
</tr>

<tr>
<td>
<b>IsRepresentativeInvolved:</b>
</td>
<td>
<%Response.write(" " & result("IsRepresentativeInvolved") & " ")%>
</td>
</tr>


<tr>
<td>
<b>RepresentativeSSN:</b>
</td>
<td>
<%Response.write(" " & result("RepresentativeSSN") & " ")%>
</td>
</tr>

<tr>
<td>
<b>RepresentativeZipCode:</b>
</td>
<td>
<%Response.write(" " & result("RepresentativeZipCode") & " ")%>
</td>
</tr>

<tr>
<td>
<b>OrganizationName:</b>
</td>
<td>
<%Response.write(" " & result("OrganizationName") & " ")%>
</td>
</tr>

<tr>
<td>
<b>IsProblemQuestion:</b>
</td>
<td>
<%Response.write(" " & result("IsProblemQuestion") & " ")%>
</td>
</tr>

<tr>
<td>
<b>IsComment:</b>
</td>
<td>
<%Response.write(" " & result("IsComment") & " ")%>
</td>
</tr>

<tr>
<td>
<b>ProblemTitle:</b>
</td>
<td>
<%Response.write(" " & result("ProblemTitle") & " ")%>
</td>
</tr>


<tr>
<td>
<b>ProblemTitle:</b>
</td>
<td>
<%Response.write(" " & result("ProblemDescription") & " ")%>
</td>
</tr>

<tr>
<td>
<b>Attachment:</b>
</td>
<td>
<%Response.write(" " & result("Attachment") & " ")%>
</td>
</tr>

<tr>
<td>
<b>StartDate:</b>
</td>
<td>
start_date
</td>
</tr>

<tr>
<td>
CloseDate:</b>
</td>
<td>
close_date </td>
</tr>


</form>

<tr class="Head2">
<td>
"Solution":
</td>
</tr>
<tr class="Body1">
<td>
<div align="center">
<form><textarea name="display_solution" rows="8" cols="80" wrap="on">"solution"</textarea></form>
</div>
</td>
</tr>

</table>
</body>
</html>



Categories

asp
Answer Discussion
Tutorials

 

san

Date:: Jan 08, 2009

Time:: 15:28

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<!--#include virtual="/helpdesk/Test/connection.asp" -->
<body>
<%
Dim strSQL, result
' Set SQL statement
strSQL = "GetAllOpenProblems"

'Execute teh SQL and obtain resultset
Set result = objconn.Execute(strsql)
'Check for Errors
If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
%>
<h3 align="center"> <%Response.Write("The following Tickets are opened today")%></h3>
<table width="90%" border="1" cellspacing="3" cellpadding="3" align="center">
<tr bgcolor="#CCCCCC" bordercolor="#999999"><th><%Response.Write("Problem ID")%></th>
<th><%Response.Write("Team Member Name")%></th>
<th><%Response.Write("Subject")%></th>
<th><%Response.Write("Component")%></th>
<th><%Response.Write("Status of the Problem")%></th>
<th>Edit</th></tr>

<%Do Until result.EOF%>
<tr><td><%Response.write(" " & result("ProblemStatusId") & " ")%></td>
<td><%Response.write(" " & result("TeamMemberName") & " ")%></td>
<td><%Response.write(" " & result("ProblemTitle") & " ")%></td>
<td><%Response.write(" " & result("DepartmentName") & " ")%></td>
<td><%Response.write(" " & result("ProblemStatus") & " ")%></td>

<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusId") %>

<td><a href="problemdetails.asp?ProblemStatusID=<% = result("ProblemStatusId") %> ">Edit</a></td></tr>
<%
result.MoveNext
loop
End If
'Close Database
'
objconn.Close
%>
</table>
</body>
</html>


--------------------------
<%@ LANGUAGE="VBScript" %>
<%
Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">



<!--#include virtual="helpdesk/Test/connection.asp" -->


<head>
<title>ProblemDetails</title>
<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusId")
  %>

 <%
Dim sqlinsproc, result
' Set SQL statement
sqlinsproc = "GetInformationForProblemStatusId"
Response.Write "DEBUG: " & sqlinsproc & "<HR>"

'Execute the SQL and obtain resultset

Set result = objconn.Execute(sqlinsproc)
'Check for Errors
If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
Response.Write("Edit problem:")
result.MoveNext

End If
'Close Database
'
objconn.Close
%>
</head>
<body>


<table >
<tr>
<td colspan="2" align="right">
</td>
</tr>
<tr >
<td colspan="2">
DetailsforProblem
</td>
</tr>
<tr >
<td colspan="2">
<table border="0" cellspacing="0">
<tr>
<td width="125" valign="top">
<b>ProblemID:</b>
</td>
<td>
<%Response.write(" " & result("ProblemStatusID") & " ")%>
</td>
</tr>
<tr>
<td>
<b>UserName</b>
</td>
<td>
<%Response.write(" " & result("UserName") & " ")%>
</td>
</tr>
<tr>
<td>
<b>EMail:</b>
</td>
<td>
<%Response.write(" " & result("Email") & " ")%>
</td>
</tr>

<tr>
<td>
<b>Location:</b>
</td>
<td>
<%Response.write(" " & result("Location") & " ")%>
</td>
</tr>
<tr>
<td>
<b>Phone</b>
</td>
<td>
<%Response.write(" " & result("Phone") & " ")%>
</td>
</tr>
<tr>
<td>
<b>Component:</b>
</td>
<td>
<%Response.write(" " & result("DepartmentName") & " ")%>
</td>
</tr>
<tr>
<td>
<b>NH</b>
</td>
<td>
<%Response.write(" " & result("NH") & " ")%>
</td>
</tr>

<tr>
<td>
<b>SSN:</b>
</td>
<td>
<%Response.write(" " & result("SSN") & " ")%>
</td>
</tr>

<tr>
<td>
<b>IsRepresentativeInvolved:</b>
</td>
<td>
<%Response.write(" " & result("IsRepresentativeInvolved") & " ")%>
</td>
</tr>


<tr>
<td>
<b>RepresentativeSSN:</b>
</td>
<td>
<%Response.write(" " & result("RepresentativeSSN") & " ")%>
</td>
</tr>

<tr>
<td>
<b>RepresentativeZipCode:</b>
</td>
<td>
<%Response.write(" " & result("RepresentativeZipCode") & " ")%>
</td>
</tr>

<tr>
<td>
<b>OrganizationName:</b>
</td>
<td>
<%Response.write(" " & result("OrganizationName") & " ")%>
</td>
</tr>

<tr>
<td>
<b>IsProblemQuestion:</b>
</td>
<td>
<%Response.write(" " & result("IsProblemQuestion") & " ")%>
</td>
</tr>

<tr>
<td>
<b>IsComment:</b>
</td>
<td>
<%Response.write(" " & result("IsComment") & " ")%>
</td>
</tr>

<tr>
<td>
<b>ProblemTitle:</b>
</td>
<td>
<%Response.write(" " & result("ProblemTitle") & " ")%>
</td>
</tr>


<tr>
<td>
<b>ProblemTitle:</b>
</td>
<td>
<%Response.write(" " & result("ProblemDescription") & " ")%>
</td>
</tr>

<tr>
<td>
<b>Attachment:</b>
</td>
<td>
<%Response.write(" " & result("Attachment") & " ")%>
</td>
</tr>

<tr>
<td>
<b>StartDate:</b>
</td>
<td>
start_date
</td>
</tr>

<tr>
<td>
CloseDate:</b>
</td>
<td>
close_date </td>
</tr>


</form>

<tr>
<td>
"Solution":
</td>
</tr>
<tr>
<td>
<div align="center">
<form><textarea name="display_solution" rows="8" cols="80" wrap="on">"solution"</textarea></form>
</div>
</td>
</tr>

</table>

</body>
</html>

san

Date:: Jan 08, 2009

Time:: 18:52

<%@ LANGUAGE="VBScript" %>
<%
Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">



<!--#include virtual="helpdesk/Test/connection.asp" -->


<head>
<title>ProblemDetails</title>

<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusID") %>
<%
Dim strSQL, result

ProblemStatusID = CLNG("0" & Request.QueryString("ProblemStatusId") )
If ProblemStatusID <= 0 Then
Response.Write "BOGUS!"
Response.End
End If

' Set SQL statement
strSQL = "GetInformationForProblemStatusId " & ProblemStatusID

Response.Write "DEBUG: " & strSQL & "<HR>"



'Execute the SQL and obtain resultset
Set result = objConn.Execute(strsql)

'Check for Errors
If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
%>
<h3 align="center"> <%Response.Write("The following Tickets are opened today")%></h3>

</head>
<body>

<table>
<tr>
<td colspan="2" align="right">
</td>
</tr>
<tr>
<td colspan="2">
DetailsforProblem
</td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellspacing="0">

<tr>
<td>
<b>UserName</b> </td>
<td>
<%Response.write(" " & result("UserName") & " ")%> </td>
</tr>
<tr>
<td>
<b>EMail:</b> </td>
<td>
<%Response.write(" " & result("UserEmail") & " ")%> </td>
</tr>

<%Do Until result.EOF%>
<%
result.MoveNext
loop
End If
'Close Database
'
objconn.Close
%>

</table>

</table>


</body>
</html>

san

Date:: Jan 12, 2009

Time:: 18:51

Search.asp

<%
' Declare our variables... always good practice!
Dim strURL ' The URL of this page so the form will work
' no matter what this file is named.

Dim cnnSearch ' ADO connection
Dim rstSearch ' ADO recordset
Dim strDBPath ' path to our Access database (*.mdb) file

Dim strSQL ' The SQL Query we build on the fly
Dim strSearch ' The text being looked for

' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL")

' Retreive the term being searched for. I'm doing it on
' the QS since that allows people to bookmark results.
' You could just as easily have used the form collection.

strSearch = Request.QueryString("search")

'strSearch = Replace(strSearch, "'", "''")

' Since I'm doing this all in one page I need to see if anyone
' has searched for something. If they have we hit the DB.
' O/W I just show the search form and quit.

%>
<p>Search for any details regarding SOST contact form. (% returns all)</p>
<form action="<%= strURL %>" method="get">
<input name="search" value="<%= strSearch %>" />
<input type="submit" />
</form>
<p>[Try 'am' or 'er' for an example]</p>
<%
If strSearch <> "" Then
 ' MapPath of virtual database file path to a physical path.
 ' If you want you could hard code a physical path here.
 
 strDBPath = Server.MapPath("database.mdb")


 ' Create an ADO Connection to connect to the sample database.
 ' We're using OLE DB but you could just as easily use ODBC or a DSN.
 set cnnSearch = Server.CreateObject("ADODB.Connection")
 
 ' This line is for the Access sample database:
 cnnSearch.Open("Provider=SQLOLEDB.1;Password=helpdesk;Persist Security Info=True;User ID=HelpDesk;Initial Catalog=HelpDesk;Data Source=s9DCA3E")

' Build our query based on the input.
 strSQL = "SELECT a.ProblemStatusId, a.ProblemStatus, e.DepartmentName, c.ProblemTitle, c.ProblemDescription " _
  & "FROM (((ProblemsUsersDeptsReps d Inner Join Departments e on d.DepartmentId = e.DepartmentId) Inner Join Problems c on d.ProblemID = c.ProblemID) Inner Join ProblemStatus a on d.ProblemsUsersDeptsRepsId = a.ProblemsUsersDeptsRepsId) " _
  & "WHERE a.ProblemStatus = 'CLOSED' " _
  & "OR a.ProblemStatusId LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
  & "OR e.DepartmentName LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
  & "OR c.ProblemTitle LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
  & "OR c.ProblemDescription LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
 & "OR a.ProblemStatus LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
  & "ORDER BY a.ProblemStatusId;"

 ' Execute our query using the connection object. It automatically
 ' creates and returns a recordset which we store in our variable.
 
 Set rstSearch = cnnSearch.Execute(strSQL)

 ' Display a table of the data in the recordset. We loop through the
 ' recordset displaying the fields from the table and using MoveNext
 ' to increment to the next record. We stop when we reach EOF.
 ' For fun I'm combining some fields and showwing you can do more then
 ' just spit out the data in the form it is in in the table.
 %>
 <table border="1">
 <tr>
 
 <th>ProblemID</th>
 <th>Department</th>
 <th>Title</th>
 <th>Description</th>
 <th>Status</th>
 <th>View</th>
 </tr>
 <%
 Do While Not rstSearch.EOF
  %>
  <tr>
   <td><%= rstSearch.Fields("ProblemStatusId").Value %></td>
  <td><%= rstSearch.Fields("DepartmentName").Value %></td>
 
  <td><%= rstSearch.Fields("ProblemTitle").Value %></td>
  <td><%= rstSearch.Fields("ProblemDescription").Value %></td>
   <td><%= rstSearch.Fields("ProblemStatus").Value %></td>
   <%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusId") %>

<td><a href="problemdetails.asp?ProblemStatusID=<%= rstSearch.Fields("ProblemStatusId").Value %> ">View</a></td>
  </tr>
  <%

  rstSearch.MoveNext
 Loop
 %>
 </table>
 <%
 ' Close our recordset and connection and dispose of the objects
 rstSearch.Close
 Set rstSearch = Nothing
 cnnSearch.Close
 Set cnnSearch = Nothing
End If


%>

Question Answered

This question has been closed, and points have been rewarded to the following experts:


san: 250

You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

No tutorials have been submitted yet. Want to be the first?

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10354

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es