 |
| ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 19th, 2004, 11:33 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Newbie asp form to database ERROR
ERROr Code:
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/_contact/thankyou.asp, line 191
Code in question:
<%
Dim FirstName, LastName, Company, Telephone, Email, Business, Service, Pages, Length, Message
Dim Conn
Dim SQLTemp
If request("insrow") = "1" THEN
FirstName = request("FirstName")
LastName = request("LastName")
Company = request("Company")
Telephone = request("Telephone")
Email = request("Email")
Business = request("Business")
Service = request("Service")
Pages = request("Pages")
Length = request("Length")
Message = request("Message")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\..\Database\quote.mdb")& ";"
Conn.Open
SQLTemp = "INSERT INTO tblCustomer (FirstName, LastName, Company, Telephone, Email, Business, Service, Pages, Length, Message)VALUES ('" & FirstName & "', " & LastName & ", '" & Company & "', '" & Telephone & "', '" & Email & "', '" & Business & "', '" & Service & "', '" & Pages & "', '" & Length & "', '" & Message & "')"
Conn.execute(SQLTemp)
Conn.Close
Set Conn = Nothing
End If
%>
|
|

May 19th, 2004, 11:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You're missing at least the closing quote for LastName:
('" & FirstName & "', " & LastName & " ', '" &
There may be more problems, but to find out for sure, use Response.Write(SQLTemp) to dump the SQL statement to the screen. Makes it easier to diagnose the problem....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Free by Prince (Track 7 from the album: 1999) What's This?
|
|

May 19th, 2004, 12:38 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thank you the progression come along
though no the error is
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 's', 's', 's', 's', 's', '', '2', '2', 'hey')'.
That from testing the form
should I put Response.Write(SQLTemp)
before the sql statement
thx again
you are most kind
"sharing is caring"
|
|

May 19th, 2004, 01:18 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You're welcome.
The Response.Write statement is just for debugging purposes. You can add the code like this:
Code:
' Comment out or remove the next two lines when the code works.
Response.Write("SQL statement is " & SQLTemp)
Response.End()
Conn.execute(SQLTemp)
If you can't figure out the problem by looking at the statement, post the results of the Response.Write statement to this list.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Optigan 1 by Blur (Track 13 from the album: 13) What's This?
|
|

May 19th, 2004, 02:22 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
do have to delimit the quotes?
SQL statement is INSERT INTO tblCustomer (FirstName, LastName, Company, Telephone, Email, Business, Service, Pages, Length, Message)VALUES ('somenme', somename', 'somecompany', '253-555-1212', ' [email protected]', 'somecompany', 'edu', '5', '15', 'words words')
thx again
you rock
|
|

May 19th, 2004, 04:30 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
now I'm getting
Microsoft JET Database Engine error '80040e37'
Could not find output table 'tblCustomer'.
hmm
|
|

May 20th, 2004, 03:25 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Not sure if it matters for Access (it doesn't on SQL Server), but try adding a space between the ) and the word VALUES.
Also, the columns Pages and Length sounds like they are a number column. If that is the case, you shouldn't use quotes for the values of those columns. E.g.:
... 's', '', 2, 2, 'hey' ...
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Adore by Prince (Track 7 from the album: Sign O The Times (Disk 2)) What's This?
|
|

May 20th, 2004, 12:43 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i'm stumbed..
now I just get
Microsoft JET Database Engine error '80040e37'
Could not find output table 'tblCustomer'.
thoughts
thx
|
|

May 20th, 2004, 12:59 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
The best way to debug this statement is to paste it in the Access query designer.
Run the page with the Response.Write statement in it, copy the output of the Write statement, create a new query in Access and paste your code in the SQL dialog for the query. Access usually provides you with much better error messages.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 27th, 2004, 03:20 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Your database might be missing a table tblcustomer
|
|
 |