I am getting the following error:
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ''FayeC'
us******************@none.com' user_compname='none'
user_newsletter=1user_dnumber='12345678''.
/asp/manageusers.asp, line 122
And I can't find the origin of the error.
Here is what I have for pulling the list of users from the db:
<table border="1" size="400" cellpadding="3"
cellspacing=0 bgcolor="white">
<%
sqlString = "SELECT * FROM users " &_
"ORDER BY user_username"
SET RS = Con.Execute( sqlString )
WHILE NOT RS.EOF
%>
<tr>
<td class="form">
<a href="updateusers.asp?uid=<%=RS( 'user_id' )%>">
<%=RS( "user_username" )%></a>
</td>
</tr>
<%
RS.MoveNext
WEND
%>
</table>
Then on updateusers.asp I have:
<form method="post" action="manageusers.asp">
<table width="500" border=1 bgcolor="#FFFFFF"
cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" bgcolor="#0066CC" class="form"> <span
class="white"><b>Update Users</b></span> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font><b>Username:</b></td>
<td width="300">
<input name= "userUsername" value="<%=userUsername %>"
size="30" maxlength="30"></td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font><b>Password:</b></td>
<td width="300">
<input name="userPassword" value="<%=userPassword %>"
size="30" maxlength="30"></td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font><b>Full name:</b></td>
<td width="300">
<input type="text" name="userFullname"
value="<%=userFullname %>" size="30" maxlength="30"></td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font><b>Company name:</b></td>
<td width="300">
<input type="text" name="userCompname"
value="<%=userCompname %>" size="30" maxlength="30"></td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font>Email address:</td>
<td width="300">
<input type="text" name="userEmail" value="<%=userEmail
%>" size="30" maxlength="45"></td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font>Receive email newsletter:</td>
<td width="300">
<input type="radio" name="userNewsletter" value="1"
checked>Yes<br>
<input type="radio" name="userNewsletter"
value="0">No<br></td>
</tr>
<tr>
<td class="form" align="right" width="200"><font
color="red">*</font>Dealer number:</td>
<td width="300">
<input type="text" name="userDnumber" value="<%=
userDnumber %>" size="30" maxlength="30"></td>
</tr>
<tr>
<tr>
<td colspan="2" align="right">
<input name="updateUser" type="submit" value="Update User"></td>
</tr>
</table>
<input name="userID" type="hidden" value="<%=userID%>">
<input name="updateUser" type="hidden" value="1">
</form>
The updateUsers function is:
<%
END IF
' Update user
IF updateUser <> "" THEN
sqlString = "UPDATE users SET " &_
"user_username='" & fixQuotes( userUsername ) & "'," &_
"user_password='" & fixQuotes( userPassword ) & "'," &_
"user_fullname='" & fixQuotes( userFullname ) & "' " &_
"user_email='" & fixQuotes( userEmail ) & "' " &_
"user_compname='" & fixQuotes( userCompname ) & "' " &_
"user_newsletter=" & userNewsletter &_
"user_dnumber='" & fixQuotes( userDnumber ) & "' " &_
"WHERE user_id=" & userID
Con.Execute sqlString
%>
<br>
<table width="500" cellpadding="4"
cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td class="form">
<%=userUsername%> was updated in the database
</td>
</tr>
</table>
Can anybody tell me where the error is?
I have gone thrrough the code several times and found nothing.....
Thank you for any help,
FayeC