classic asp SQL string syntax error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • splendid9
    New Member
    • Mar 2008
    • 56

    classic asp SQL string syntax error

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'AND'.

    this is the line.......
    strSql = strSql & "AND customer = '" & Session("Accoun t") & "'"


    could anyone help me out with this ............?
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Can you print the rest of your sql statement or at least the few lines before and after this one.

    Ta

    Dr B

    Comment

    • Shouper
      New Member
      • Mar 2008
      • 1

      #3
      Try sticking a space between " and AND

      Originally posted by splendid9
      Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

      [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'AND'.

      this is the line.......
      strSql = strSql & "AND customer = '" & Session("Accoun t") & "'"


      could anyone help me out with this ............?

      Comment

      Working...