CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft OLE DB Provider for SQL Server (0x80040E14) An expression of non-boolean type specified in a context where a condition is expected, near

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    77
  • Date Created
    Friday, December 24, 2010
  • This Article Has been Viewed
    1755 times
  • Short Desc
    When writing your SQL Query Statement you have to make sure that you have an = sign for your value.
  • Details
    When writing your SQL Query Statement, you may sometimes leave out important key characters that are required in making your Query Work.

     
    Microsoft OLE DB Provider for SQL Server (0x80040E14)
    An expression of non-boolean type specified in a context where a condition is expected, near 'maid'.
    /My.asp, line 14
  • Recreate Issue
    To resproduce this error.

    <%
    sql.commandtext="select col1, col2 from table1 where col1"
    %>

    The above will give you the error, as you can tell, the "where col1" does not have no value (or) = sign.
  • Resolve Issue
    To resolve this issue and write your code with the appropriate conditions.

    <%
    sql.commandtext="select col1, col2 from table1 where col1=?"
    %>


    As you can see in the above, we have our col1=?