Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 sql statement
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

corneillie
Junior Member

140 Posts

Posted - 24 July 2007 :  14:32:01  Show Profile  Visit corneillie's Homepage
Hello,

I have a problem that I cannot solve:

The error I get is:

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'E-mail = test@test.be'.

the sql statement I use is:
sqlMainData = "SELECT * FROM bestellingen WHERE E-mail = " & strEmail


strEmail is a variable that comes from the form:

<%
Dim strEmail
strEmail = Request.Form("email")
if strEmail = "" then
response.redirect("form.html")
end if
%>


thx

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 24 July 2007 :  15:35:28  Show Profile  Visit HuwR's Homepage
sqlMainData = "SELECT * FROM bestellingen WHERE E-mail = '" & strEmail & "'"
Go to Top of Page

corneillie
Junior Member

140 Posts

Posted - 24 July 2007 :  16:18:58  Show Profile  Visit corneillie's Homepage
thx
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 July 2007 :  04:07:48  Show Profile
You might want to sanitise the form input before passing it through to an SQL statement.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 25 July 2007 :  05:10:30  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
and select only the columns you need i.e.

"SELECT column1, column2 FROM bestellingen WHERE E-mail = '" & strEmail & "'"

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07