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:
  • Incorrect Syntax 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:
    4238
  • Date Created
    Friday, March 11, 2022
  • This Article Has been Viewed
    465 times
  • Short Desc
    Whether it's a select, insert, update, or delete statement, you will receive the error, Incorrect Syntax near '?' if it is not formatted correctly.
  • Details
    Making sure your SQL Statements are properly formatted will make your job faster and less erroring.
  • Recreate Issue
    Using a ? to signify a value is needed.

    strSQL = "Update SiteAdmin set SiteStructure=?"
  • Resolve Issue
    Using SqlCommand, will not work, we will need to change to using the @ Command instead.
    strSQL = "Update SiteAdmin set SiteStructure=@SiteStructure"