Delete Record

G

Graham

I am a little confused with the following error code. I only have two
fields, firstname and lastname, which are both complete. Can anyone help
please/

Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 2.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for
all form fields that are used in the query

regards


Graham
30/7
 
S

Stefan B Rusynko

Are those the only 2 fields in the Access Table

If so then there is an error in the way you are passing the 2 field values (incorrect delimiters)
- post a snipped of your code

--




|I am a little confused with the following error code. I only have two
| fields, firstname and lastname, which are both complete. Can anyone help
| please/
|
| Database Results Error
| Description: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
| Expected 2.
| Number: -2147217904 (0x80040E10)
| Source: Microsoft OLE DB Provider for ODBC Drivers
|
| One or more form fields were empty. You should provide default values for
| all form fields that are used in the query
|
| regards
|
|
| Graham
| 30/7
|
|
 
G

Graham

There is also an email address field and a timestamp field.

Here is the code for the delete record form: Please excuse size of snippet
as I am unfamiliar with it This is a .htm file

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
</head>

<body bgcolor="#003366" text="#FFFFFF">

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form method="POST" action="deleterecord.asp">
<p>First Name: <input type="text" name="firstname" size="20"></p>
<p>Last Name :<input type="text" name="lastname" size="20"></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
</form>

</body>

</html>

Do you wish to see the deleterecord.asp file as well?

thanks Graham
 
S

Stefan B Rusynko

Yes
The ASP code w/ deleting the record is the one you are getting an error on, so your form html is not relevant



--




| There is also an email address field and a timestamp field.
|
| Here is the code for the delete record form: Please excuse size of snippet
| as I am unfamiliar with it This is a .htm file
|
| <html>
|
| <head>
| <meta http-equiv="Content-Language" content="en-us">
| <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
| <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
| <meta name="ProgId" content="FrontPage.Editor.Document">
| <title>New Page 2</title>
| </head>
|
| <body bgcolor="#003366" text="#FFFFFF">
|
| <p>&nbsp;</p>
| <p>&nbsp;</p>
| <p>&nbsp;</p>
| <p>&nbsp;</p>
| <form method="POST" action="deleterecord.asp">
| <p>First Name: <input type="text" name="firstname" size="20"></p>
| <p>Last Name :<input type="text" name="lastname" size="20"></p>
| <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
| <p>&nbsp;</p>
| <p><input type="submit" value="Submit" name="B1"><input type="reset"
| value="Reset" name="B2"></p>
| </form>
|
| </body>
|
| </html>
|
| Do you wish to see the deleterecord.asp file as well?
|
| thanks Graham
|
|
|
| | > Are those the only 2 fields in the Access Table
| >
| > If so then there is an error in the way you are passing the 2 field values
| (incorrect delimiters)
| > - post a snipped of your code
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| | > |I am a little confused with the following error code. I only have two
| > | fields, firstname and lastname, which are both complete. Can anyone help
| > | please/
| > |
| > | Database Results Error
| > | Description: [Microsoft][ODBC Microsoft Access Driver] Too few
| parameters.
| > | Expected 2.
| > | Number: -2147217904 (0x80040E10)
| > | Source: Microsoft OLE DB Provider for ODBC Drivers
| > |
| > | One or more form fields were empty. You should provide default values
| for
| > | all form fields that are used in the query
| > |
| > | regards
| > |
| > |
| > | Graham
| > | 30/7
| > |
| > |
| >
| >
|
|
 
G

Graham

Here is the deleterecord.asp code:
Is it noteworthy that the statements are repeated. In Frontpage, the first
are "greyed" out, the second are in "bold"?


thanks again

Graham
1/8
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body bgcolor="#003366" text="#FFFFFF">

<table width="100%" border="1">
<thead>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" startspan s-columnnames
s-columntypes
s-dataconnection="2008entry" b-tableformat="TRUE" b-menuformat="FALSE"
s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-ListFormat="0" b-makeform="FALSE" s-recordsource s-displaycolumns
s-criteria s-order
s-sql="DELETE DISTINCTROW firstname&lt;br&gt; FROM
Results&lt;br&gt; WHERE (firstname='::Contact_firstName::')&lt;br&gt;
AND (lastname='::Contact_LastName::') &lt;br&gt;"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields="Contact_firstName=&amp;Contact_LastName="
s-NoRecordsFound="No records returned." i-MaxRecords="256"
i-GroupSize="0"
BOTID="0" u-dblib="_fpclass/fpdblib.inc"
u-dbrgn1="_fpclass/fpdbrgn1.inc"
u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY"
local_preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;Database Results regions will not preview
unless this page is fetched from a Web server with a web browser. The
following table row will repeat once for every record returned by the
query.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;"
preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the start of a Database Results region.
The page must be fetched from a web server with a web browser to display
correctly; the current web is stored on your local disk or
network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include
file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="DELETE DISTINCTROW firstname FROM Results WHERE
(firstname='::Contact_firstName::') AND
(lastname='::Contact_LastName::') "
fp_sDefault="Contact_firstName=&Contact_LastName="
fp_sNoRecords="<tr><td colspan=16 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="2008entry"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" i-CheckSum="30613" endspan -->
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="TBODY"
local_preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the end of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;"
preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the end of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include
file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" i-CheckSum="62730" endspan -->
</tbody>
</table>

<table width="100%" border="1">
<thead>
</thead>
</table>

</body>

</html>

Stefan B Rusynko said:
Yes
The ASP code w/ deleting the record is the one you are getting an error
on, so your form html is not relevant
--




| There is also an email address field and a timestamp field.
|
| Here is the code for the delete record form: Please excuse size of snippet
| as I am unfamiliar with it This is a .htm file
|
| <html>
|
| <head>
| <meta http-equiv="Content-Language" content="en-us">
| <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
| <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
| <meta name="ProgId" content="FrontPage.Editor.Document">
| <title>New Page 2</title>
| </head>
|
| <body bgcolor="#003366" text="#FFFFFF">
|
| <p>&nbsp;</p>
| <p>&nbsp;</p>
| <p>&nbsp;</p>
| <p>&nbsp;</p>
| <form method="POST" action="deleterecord.asp">
| <p>First Name: <input type="text" name="firstname" size="20"></p>
| <p>Last Name :<input type="text" name="lastname" size="20"></p>
| <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
| <p>&nbsp;</p>
| <p><input type="submit" value="Submit" name="B1"><input type="reset"
| value="Reset" name="B2"></p>
| </form>
|
| </body>
|
| </html>
|
| Do you wish to see the deleterecord.asp file as well?
|
| thanks Graham
|
|
|
| | > Are those the only 2 fields in the Access Table
| >
| > If so then there is an error in the way you are passing the 2 field values
| (incorrect delimiters)
| > - post a snipped of your code
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| | > |I am a little confused with the following error code. I only have two
| > | fields, firstname and lastname, which are both complete. Can anyone help
| > | please/
| > |
| > | Database Results Error
| > | Description: [Microsoft][ODBC Microsoft Access Driver] Too few
| parameters.
| > | Expected 2.
| > | Number: -2147217904 (0x80040E10)
| > | Source: Microsoft OLE DB Provider for ODBC Drivers
| > |
| > | One or more form fields were empty. You should provide default values
| for
| > | all form fields that are used in the query
| > |
| > | regards
| > |
| > |
| > | Graham
| > | 30/7
| > |
| > |
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top