1
I’m using SQL for a classic ASP page and in a part of the code I have this:
If (opcao = 1) Then
If credito > 0 Then
SQL = "UPDATE FO_Passaportes SET creditoTotal = creditoTotal + " & credito & " WHERE IDPassaporte = " & IDPassaporte & ""
Else
SQL = "UPDATE FO_Passaportes SET creditoUsado = creditoUsado + " & Abs(credito) & " WHERE IDPassaporte = " & IDPassaporte & ""
End If
End If
If (opcao = 2) Then
SQL = "UPDATE FO_Passaportes SET creditoTotal = creditoTotal - " & Abs(credito) & " WHERE IDPassaporte = " & ID Passaporte & ""
End If
When I run I’m getting the following error:
Microsoft Vbscript Compilation error '800a0401'
Expected end of statement
/GIP-Ep/Training/passports/passport.Sp, line 234
SQL = "UPDATE Fo_passports SET creditTotal = creditTotal - " & Abs(credit) & " WHERE Idpassport = " & ID Passport & ""----------------------------------------------------------------------------------------------------------------^
The error is pointing to my last query:
If (opcao = 2) Then
SQL = "UPDATE FO_Passaportes SET creditoTotal = creditoTotal - " & Abs(credito) & " WHERE IDPassaporte = " & ID Passaporte & ""
End If
What I’m doing wrong??
I don’t believe there’s that space in
ID Passaporte
– rray
@You are right Thank you xD >.<
– IdkWhy