# Syntax Error in ASP update Statement

**URL:** https://forum.kirupa.com/t/syntax-error-in-asp-update-statement/248442
**Category:** programming
**Created:** [January 8, 2008, 9:04am UTC](https://forum.kirupa.com/t/syntax-error-in-asp-update-statement/248442 "2008-01-08T09:04:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![limcurry87](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@limcurry87](https://forum.kirupa.com/u/limcurry87)
#### Post date: [January 8, 2008, 9:04am UTC](https://forum.kirupa.com/t/syntax-error-in-asp-update-statement/248442/1 "2008-01-08T09:04:26Z")

</div>

## Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ‘(fullname = Gary Lee)’. \*\*/Prj4/FYPLevel1.asp, line 383 [SIZE=2]

```
    &lt;%
    if varlevel &lt; 3 then

        varlevel = varlevel + 1            
    
        'Increment database by 1
        dim objConn,objRec,SQL

          Set objConn = Server.CreateObject("ADODB.Connection")
          Set objRec = server.CreateObject("ADODB.Recordset")
          
          objConn.Mode = 0
          
          SQL = "UPDATE userInfo SET vlevel = " &varlevel& " WHERE (fullname = " &varName& ")"

          
          objConn.Open StrCon
          objRec.Open SQL, objConn ----&gt;(This is my line 383)
          
         ' objConn.Execute(SQL)
          
        objRec.Close
        objConn.Close
        set objRec = nothing
        set objConn = nothing
        %&gt;
        alert("increase!")
        &lt;%
        
    end if
    %&gt;

```

* * *

I’ve look at some post from other forum regarding this error message and ‘Syntax Error in Update Statement (as i’d that error message before this)’ …

But is it because ASP treat my varName as something else? Cus my varName is a string and my varlevel is a integer actually…

If anyone could guide me into the light that is great=)  
[/SIZE]\*\*
