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="updateuse rs.asp?uid=<%=R S( 'user_id' )%>">
<%=RS( "user_usern ame" )%></a>
</td>
</tr>
<%
RS.MoveNext
WEND
%>
</table>
Then on updateusers.asp I have:
<form method="post" action="manageu sers.asp">
<table width="500" border=1 bgcolor="#FFFFF F"
cellpadding="4" cellspacing="0" >
<tr>
<td colspan="2" bgcolor="#0066C C" class="form"> <span
class="white">< b>Update Users</b></span> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font><b>Usernam e:</b></td>
<td width="300">
<input name= "userUserna me" value="<%=userU sername %>"
size="30" maxlength="30"> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font><b>Passwor d:</b></td>
<td width="300">
<input name="userPassw ord" value="<%=userP assword %>"
size="30" maxlength="30"> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font><b>Full name:</b></td>
<td width="300">
<input type="text" name="userFulln ame"
value="<%=userF ullname %>" size="30" maxlength="30"> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font><b>Company name:</b></td>
<td width="300">
<input type="text" name="userCompn ame"
value="<%=userC ompname %>" size="30" maxlength="30"> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font>Email address:</td>
<td width="300">
<input type="text" name="userEmail " value="<%=userE mail
%>" size="30" maxlength="45"> </td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font>Receive email newsletter:</td>
<td width="300">
<input type="radio" name="userNewsl etter" value="1"
checked>Yes<br>
<input type="radio" name="userNewsl etter"
value="0">No<br ></td>
</tr>
<tr>
<td class="form" align="right" width="200"><fo nt
color="red">*</font>Dealer number:</td>
<td width="300">
<input type="text" name="userDnumb er" value="<%=
userDnumber %>" size="30" maxlength="30"> </td>
</tr>
<tr>
<tr>
<td colspan="2" align="right">
<input name="updateUse r" type="submit" value="Update User"></td>
</tr>
</table>
<input name="userID" type="hidden" value="<%=userI D%>">
<input name="updateUse r" 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_newslette r=" & userNewsletter &_
"user_dnumber=' " & fixQuotes( userDnumber ) & "' " &_
"WHERE user_id=" & userID
Con.Execute sqlString
%>
<br>
<table width="500" cellpadding="4"
cellspacing="0" bgcolor="#FFFFF F">
<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