Ask a Question related to ASP Database, Design and Development.
-
Dave #1
Receiving 0x80040E10 error for code line 87
I'm learning. Right now I'd like to have a working example up and running;
before I begin pounding my head against the keyboard out of frustration and
confusion.
I have checked the DB field names, cleared records with blank fields, and
checked the type of data being inserted; no problems. (I was referencing
[url]http://www.aspfaq.com/show.asp?id=2128[/url] for the issue I'm experiencing.) Here
is the error.
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/regweb/dpg/viewdb.asp, line 87
Line 85 - 87 reads:
'Executing the SELECT query creates an ADO Recordset object.
'This holds the data you get from the database.
Set objRS = objConn.Execute(strQuery)
I have included the example code below.
<%@ Language=VBScript %>
<html>
<head>
<title>View Guest Book</title>
</head>
<body>
<font face="MS Gothic">
<h2>View Guest Book</h2>
<%
'Read in any user input. Any of these can be empty.
'By doing this first, we can preserve the user input in the form.
dim strTB1, strTB2, strTB3, strTB4, strMB1, strSort, iDelete
strTB1 = Server.HTMLEncode(Request.QueryString("From"))
strTB2 = Server.HTMLEncode(Request.QueryString("EMailAdd"))
strTB3 = Server.HTMLEncode(Request.QueryString("CC"))
strTB4 = Server.HTMLEncode(Request.QueryString("Subject"))
strMB1 = Server.HTMLEncode(Request.QueryString("Memo"))
strSort = Server.HTMLEncode(Request.QueryString("sort"))
iDelete = CInt(Request.QueryString("Delete"))
'Because we use this variable, and it might not be set...
If "" = strSort Then
strSort = "FID"
End If
%>
<p>
<FORM NAME="ViewGuestBook" METHOD="GET" ACTION="viewgb.asp">
<table>
<tr>
<td><font face="MS Gothic">Sort by which column:</td>
<td><SELECT NAME="sort" SIZE="1">
<OPTION VALUE="FID">ID Number</OPTION>
<OPTION VALUE="FTB1">Name</OPTION>
<OPTION VALUE="FTB2">Email</OPTION>
<OPTION VALUE="FTB3">CC</OPTION>
<OPTION VALUE="FTB4">Subject</OPTION>
<OPTION VALUE="FMB1">Memo</OPTION>
</SELECT></td>
</tr><tr>
<td><font face="MS Gothic">Name Contains:</td>
<td><INPUT TYPE="TEXT" NAME="From" VALUE="<%=strTB1%>"></td>
</tr><tr>
<td><font face="MS Gothic">E-mail Address Contains:</td>
<td><INPUT TYPE="TEXT" NAME="EmailAdd" VALUE="<%=strTB2%>"></td>
</tr><tr>
<td><font face="MS Gothic">CC Contains:</td>
<td><INPUT TYPE="TEXT" NAME="CC" VALUE="<%=strTB3%>"></td>
</tr><tr>
<td><font face="MS Gothic">Subject Contains:</td>
<td><INPUT TYPE="TEXT" NAME="Subject" VALUE="<%=strTB4%>"></td>
</tr><tr>
<td><font face="MS Gothic">Memo Contains:</td>
<td><INPUT TYPE="TEXT" NAME="Memo" VALUE="<%=strMB1%>"></td>
</tr>
</table>
<INPUT TYPE="SUBMIT" VALUE="Submit Search Parameters">
</p>
<%
'Create your connection string, create an instance of the Connection
object,
' and connect to the database.
strProvider = "Provider=Microsoft.JET.OLEDB.4.0;Data
Source=F:\RegWeb\Databases\guestbook.mdb;"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strProvider
'Define the query.
If iDelete = 0 Then
'If the Delete variable is not set, the query is a SELECT query.
'* means all fields. ASC means ASCII. % is a wildcard character.
strQuery = "SELECT * FROM GuestBook"
strQuery = strQuery & " WHERE FTB1 LIKE '%" & strTB1 & "%'"
strQuery = strQuery & " AND FTB2 LIKE '%" & strTB2 & "%'"
strQuery = strQuery & " AND FTB3 LIKE '%" & strTB3 & "%'"
strQuery = strQuery & " AND FTB4 LIKE '%" & strTB4 & "%'"
strQuery = strQuery & " AND FMB1 LIKE '%" & strMB1 & "%'"
strQuery = strQuery & " ORDER BY " & StrSort & " ASC"
Else
'We want to delete a record.
strQuery = "DELETE FROM GuestBook WHERE FID=" & iDelete
End If
'Executing the SELECT query creates an ADO Recordset object.
'This holds the data you get from the database.
Set objRS = objConn.Execute(strQuery)
'Now that you have the database data stored in the Recordset object,
' show it in a table.
%>
<p>
<FORM NAME="EditGuestBook" METHOD="GET" ACTION="viewgb.asp">
<table border=1 cellpadding=4 >
<%
On Error Resume Next
If objRS.EOF Then
If iDelete = 0 Then
Response.Write "<tr><td><font face="MS Gothic">There are
no entries in the database.</font></td></tr>"
Else
Response.Write "<tr><td><font face="MS Gothic">Record " &
iDelete & " was deleted.</font></td></tr>"
End If
Else
'Print out the field names using some of the methods and properties
' of the Recordset object.
Response.Write "<tr>"
'For each column in the current row...
For i = 1 to (objRS.Fields.Count - 1)
' write out the field name.
Response.Write "<td><font face="MS Gothic"><B>" &
objRS(i).Name & "</B></font></td>"
Next
Response.Write "<td><font face="MS
Gothic"><B>Delete</B></font></td>"
Response.Write "</tr>"
'Print out the field data, using some other methods and properties
' of the Recordset object. When you see a pattern in how they are
used,
' you can look up others and experiment.
'While not at the end of the records in the set...
While Not objRS.EOF
Response.Write "<tr>"
'For each column in the current row...
For i = 1 to (objRS.Fields.Count - 1)
' write out the data in the field.
Response.Write "<td><font face="MS Gothic">" & objRS(i)
& "</font></td>"
Next
'Add a button that will pass in an ID number to delete a record.
%><td><INPUT TYPE="SUBMIT" NAME="Delete"
VALUE="<%=objRS(0)%>"></td><%
Response.Write "</tr>"
'Move to the next row.
objRS.MoveNext
Wend
End If 'objRS.EOF
%>
</table>
</FORM>
<%
'Close the Connection.
objConn.Close
%>
</font>
</body>
</html>
Dave Guest
-
My client is receiving error messages
I redesigned & updated my client's site with DW Version 9.0 Build 3481. My client is editing thw site with Contribute 2. 2 problems have arisen... -
Receiving error when trying to update to CS 3.0.1
I have been able to download the update through the download manager and the standalone version from the website. I get an error during the install... -
Receiving Unspecified Error...
Unspecified error C:\INETPUB\WWWROOT\WELCOME\../common/adovbs.inc, line 4 And line 4 is this Connect.Open "database" Its happening across the... -
Urgent! Receiving error and duplicating records
Please bear in mind I have only been using Access since December/January, and have learned how to do what I've done in this short time by trial and... -
C# Equivalent of VB.Net Code -- One line of code, simple
Great idea, thanks. I only need something simple in order for my contact form to work correctly. It's nothing with a lot of overhead. Ron... -
Dave #2
Re: Receiving 0x80040E10 error for code line 87
Thanks Ray,
Unfortunately I'm still running into the same error. I have cleared the
browser cache.
Ray I don't know what you mean about pasting into Access query. Would you
mind going into greater detail?
Any other ideas? I'm stumped.
Dave
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uNahW$sVDHA.1896@TK2MSFTNGP12.phx.gbl...it>
> "Dave" <dgrisset@sewanee.edu> wrote in message
> news:e%23ojJ5sVDHA.2352@TK2MSFTNGP12.phx.gbl...>> > I'm learning.
> Cool!
>>> >
> > Line 85 - 87 reads:
> >
> > 'Executing the SELECT query creates an ADO Recordset object.
> > 'This holds the data you get from the database.
> > Set objRS = objConn.Execute(strQuery)
>
> Make it so that it reads:
>
> 'Executing the SELECT query creates an ADO Recordset object.
> 'This holds the data you get from the database.
> 'Set objRS = objConn.Execute(strQuery)
> RESPONSE.WRITE STRQUERY
> RESPONSE.END
>
> Copy and paste the result into an Access query window and try to execute> if the problem doesn't jump out at you when you see the query. If that
> doesn't help, post the query here and someone may see something wrong.
>
> Ray at work
>
>
Dave Guest
-
Ray at #3
Re: Receiving 0x80040E10 error for code line 87
What are you trying to get from this query? This will return everything
that isn't null. The use of "LIKE '%%'" doesn't make much sense, really.
And when you say you need to remove the F, are you saying that your columns
are named TB1, TB2, not FTB1, FTB2? If so, yes.
Ray at work
"Dave" <dgrisset@sewanee.edu> wrote in message
news:eW6afqtVDHA.2488@TK2MSFTNGP09.phx.gbl...and> Okay, done.
> Opened the page and the following appears at the bottom of the page.
>
> SELECT * FROM GuestBook WHERE FTB1 LIKE '%%' AND FTB2 LIKE '%%' AND FTB3
> LIKE '%%' AND FTB4 LIKE '%%' AND FMB1 LIKE '%%' ORDER BY FID ASC
>
> Well it looks like I need to remove "F" from "TB1", "TB2", "TB3", "TB4"> "MB1".
>
> Dave
>
>
Ray at Guest
-
Dave #4
Re: Receiving 0x80040E10 error for code line 87
My database will always be small. I want to be able to view all records
within the database and then delete the unnecessary or incomplete records.
The use of "LIKE '%%'" was originally scripted by the coder.
Microsoft had this particular coded page available as an example. The only
things I've updated are the file references. Just needed to see a working
example. I can provide the URL of the example.
My columns are named TB1, TB2, ... I tried removing the F from FTB1, FTB2,
.... still receiving the same Jet error.
My server is running W2K with SP4, MDAC 2.7 and I know the latest Jet comes
with SP4.
Dave
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eJ6X3L2VDHA.2040@TK2MSFTNGP11.phx.gbl...columns> What are you trying to get from this query? This will return everything
> that isn't null. The use of "LIKE '%%'" doesn't make much sense, really.
>
> And when you say you need to remove the F, are you saying that your> are named TB1, TB2, not FTB1, FTB2? If so, yes.
>
> Ray at work
>
> "Dave" <dgrisset@sewanee.edu> wrote in message
> news:eW6afqtVDHA.2488@TK2MSFTNGP09.phx.gbl...> and> > Okay, done.
> > Opened the page and the following appears at the bottom of the page.
> >
> > SELECT * FROM GuestBook WHERE FTB1 LIKE '%%' AND FTB2 LIKE '%%' AND FTB3
> > LIKE '%%' AND FTB4 LIKE '%%' AND FMB1 LIKE '%%' ORDER BY FID ASC
> >
> > Well it looks like I need to remove "F" from "TB1", "TB2", "TB3", "TB4">> > "MB1".
> >
> > Dave
> >
> >
>
Dave Guest
-
Ray at #5
Re: Receiving 0x80040E10 error for code line 87
Nice! Yes, although it can be a bit of a challenge at first, if you can
just try to make it so you can see through the eyes of your server so you
are seeing everything that it is seeing, most problems can be worked out.
Ray at work
"Dave" <dgrisset@sewanee.edu> wrote in message
news:uI4XAK6VDHA.532@TK2MSFTNGP10.phx.gbl...> Got it figured out. Thanks for your help. The problem solving tricks are
> invaluable.
>
> Dave
>
>
Ray at Guest



Reply With Quote

