DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP (http://www.daniweb.com/forums/forum62.html)
-   -   Duplicating Ranking System (http://www.daniweb.com/forums/thread197589.html)

skb0415 Jun 15th, 2009 12:34 pm
Duplicating Ranking System
 
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
        Line 30---->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

jsvanc Jun 29th, 2009 3:31 pm
Re: Duplicating Ranking System
 
Quote:

Originally Posted by skb0415 (Post 890876)
elseIf msrankpriv <> "0" Then
        sSQL = "UPDATE memberSports SET msrankpriv = " & msrankpriv & " WHERE msMember = " & memberId
        Line 30---->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.


All times are GMT -4. The time now is 9:34 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC