I have been struggling over this for about a week now. I am trying to duplicate a ranking system for a client so that it can be accessed privately and players can have a different rating from publicly. I have added new field to encompass my new information. Everything works out fine until I want to UPDATE the information and I then get this error:

Microsoft JET Database Engine error '80040e14'

Syntax error in UPDATE statement.

/administration/scouting_update_ranktestpriv.asp, line 30

When I go to look at this line this is the written code

elseIf msrankpriv <> "0" Then
	sSQL = "UPDATE memberSports SET msrankpriv = " & msrankpriv & " WHERE msMember = " & memberId
	[B]Line 30[/B]---->objConn.Execute sSQL
	sSQL = "UPDATE memberSports SET mscheckspriv = " & mscheckspriv & " WHERE msMember = " & memberId

Can anyone please help me identify my problem. I think it is simple but I cannot figure it out

elseIf msrankpriv <> "0" Then
	sSQL = "UPDATE memberSports SET msrankpriv = " & msrankpriv & " WHERE msMember = " & memberId
	[B]Line 30[/B]---->objConn.Execute sSQL
	sSQL = "UPDATE memberSports SET mscheckspriv = " & mscheckspriv & " WHERE msMember = " & memberId

Try this:

elseIf msrankpriv <> "0" Then
	sSQL = "UPDATE memberSports SET msrankpriv = '" & msrankpriv & "' WHERE msMember = '" & memberId & "'"
	objConn.Execute sSQL
	sSQL = "UPDATE memberSports SET mscheckspriv = '" & mscheckspriv & "' WHERE msMember = '" & memberId & "'"

Let me know if this works for you.

This article has been dead for over six months. Start a new discussion instead.