incorrect syntax on update

Results 1 to 3 of 3

Thread: incorrect syntax on update

  1. #1
    Join Date
    Dec 1969

    Default incorrect syntax on update

    The includes file works I connect to the db all the time. It works with insert but I get an error on update.<BR><BR>Here is the code:<BR><BR>strSQL2 = "Update DBO.T_Person Set DepartmentID = "& access &" Where NBKID = &#039;"& nbk &"&#039;"<BR><BR>I dont know why I&#039;m getting this error. Please help<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR><BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near &#039;=&#039;. <BR><BR>/includes/SQLServer.asp, line 33 <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: incorrect syntax on update

    Try writing out your SQL before you execute it, most likely you have nothing in the access variable.

  3. #3
    Join Date
    Dec 1969

    Default did u..

    response.write strsql2 ? see what it shows, else try putting a space before and after "&" in all places, who knows?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts