Number of query values error
HejJeg får denne fejl
Microsoft JET Database Engine error '80040e14'
Number of query values and destination fields are not the same.
/update_main_program.asp, line 119
strSQL = "SELECT count(*) AS antal FROM Program"
strSQL = strSQL & " WHERE [Match_Number] = '" & Matchnumber & "'"
Set objRSProgram = objConn.Execute(strSQL)
If objRSProgram("antal") <> 0 Then
strSQL = "UPDATE Program SET "
strSQL = strSQL & "Match_Number='" & Matchnumber & "',"
strSQL = strSQL & "Match_Day='" & TheDay & "',"
strSQL = strSQL & "Match_Month='" & TheMonth & "',"
strSQL = strSQL & "Match_Year='" & TheYear & "',"
strSQL = strSQL & "Match_Time='" & TheTime & "',"
strSQL = strSQL & "Home_Team='" & Hometeam & "',"
strSQL = strSQL & "Away_Team='" & Awayteam & "',"
strSQL = strSQL & "Play_Ground='" & Playground & "',"
strSQL = strSQL & "Total_Score='" & Score & "',"
strSQL = strSQL & "Team_Name='" & strTN & "'"
strSQL = strSQL & " WHERE [Match_Number] = '" & Matchnumber & "'"
Else
strSQL = "INSERT INTO Program (Match_Number, Match_Date, Home_Team, Away_Team, Play_Ground, Total_Score, Team_Name) VALUES ('" & Matchnumber & "', '" & TheDay & "', '" & TheMonth & "', '" & TheYear & "', '" & TheTime & "', '" & Hometeam & "', '" & Awayteam & "', '" & Playground & "', '" & Score & "', '" & strTN & "')"
End If
objConn.Execute(strSQL)
Fejlen opstår ved sidste linje og hvis jeg sætter en Response.Write(strSQL)
Response.End()
Ind får den så indholder den de dataer den skal, hvad kan fejlen skyldes !?
