473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

80040e14 Syntax Error (missing operator)

Hello,

One of our web hosting clients is getting the following error when
someone tried to log in form their login page:

--- ODBC ERROR ---
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression 'userid= AND password='''.

/store/process_login.asp, line 26
--- ODBC ERROR ---

When I open the 'process_login.asp' page in Notepad, this is the code
snippet:

(Note, the numbers at the beginning of each line are not in the code;
they are reference for line numbers for the purposes of this post)

--- CODE SNIPPET ---
23 strsql = "SELECT * FROM registry WHERE userid=" & userid & " "
24 strsql = strsql & "AND password='" & Request("pass") & "'"
25
26 rstlogin.Open strsql, oconnect
--- CODE SNIPPET ---

So line 26 is actually the 'rstlogin.Open' line. Unfortunately, I am
not an ASP coder, just a Systems Admin, and the person who originally
coded this is not available, so it's dropped in my lap, it appears.

Your help in shedding any light on this is greatly appreciated.
Please let me know if there is any further info you need (more
snippets, perhaps??), and I will see what I can do to provide them

Thank you, in advance, for your help.

Alan Murrell <sw****@hotmail.com>
Nov 12 '05 #1
1 6839
On 17 Sep 2003 10:12:15 -0700 in comp.databases.ms-access,
sw****@hotmail.com (Alan Murrell) wrote:
Hello,

One of our web hosting clients is getting the following error when
someone tried to log in form their login page:

--- ODBC ERROR ---
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression 'userid= AND password='''.

/store/process_login.asp, line 26
--- ODBC ERROR ---

When I open the 'process_login.asp' page in Notepad, this is the code
snippet:

(Note, the numbers at the beginning of each line are not in the code;
they are reference for line numbers for the purposes of this post)

--- CODE SNIPPET ---
23 strsql = "SELECT * FROM registry WHERE userid=" & userid & " "
24 strsql = strsql & "AND password='" & Request("pass") & "'"
25
26 rstlogin.Open strsql, oconnect
--- CODE SNIPPET ---

So line 26 is actually the 'rstlogin.Open' line. Unfortunately, I am
not an ASP coder, just a Systems Admin, and the person who originally
coded this is not available, so it's dropped in my lap, it appears.

Your help in shedding any light on this is greatly appreciated.
Please let me know if there is any further info you need (more
snippets, perhaps??), and I will see what I can do to provide them


Somewhere along the line, you haven't populated the variable called
userid.

Also for blank passwords you want to do something like:

strsql = strsql & "and password"
if len(Request("pass")=0 then
strsql = strsql & " Is Null"
else
strsql = strsql & " = '" & Request("Pass") & "'"
end if

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
3
by: kufre | last post by:
I need some fresh eyes to take a look at this code for me and let me know what it is I'm doing wrong because I keep getting all kinds of error message with this code. I've had several people help...
1
by: chug | last post by:
I'm not a programmer but it's my job to solve this. Can someone help me with this error message? Microsoft OLE DB Provider for ODBC Drivers error '80040e14' Syntax error (missing operator)...
24
by: deko | last post by:
I'm trying to log error messages and sometimes (no telling when or where) the message contains a string with double quotes. Is there a way get the query to insert the string with the double...
1
by: FayeC | last post by:
I am getting the following error: Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression ''FayeC' user_email='whatever@none.com' user_compname='none'...
7
by: John Øllgård Jensen | last post by:
Hi Using MS Asccess 2000: In a query I'm trying to create a new field with following expression: FilmDate: Left(,4) The field "FilmNo" is another text field in the query. This is...
1
by: rwilki02 | last post by:
All, We are using a process that updates tables in SQL Server 2000. The process gives the following error but the table is updated even though there is an error. My question is why are the...
9
by: kazper | last post by:
Good day, I'm currently trying to print the data in my database using Visual Basic but I have a little problem with the codes, need your help about figuring out what I might be missing. I keep on...
1
by: renukayuvaraj | last post by:
When i run the report its showing runtime error in this line as.... (Syntax error - missing operator in query expression) DataEnvironment1.rsCommand1.Open ("select * from GRNTrans where SUPPLIER...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.