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

  •  Hi

          I try to update the following syntax and  i got the error of '80040e14'. How can i correct this,please? Thanks.

    SQlstmt = "Update tmp_allmem  " & _

      " set title = '" & cTitle & "', firstname = '" & FName & "',  lastname ='" & LName & "',headname='" & cHeadName & "', " & _

      " designation ='" & cDesignation & "',sectionname='" & cSection & "',AITgrad='" & cAITgrad & "',sex='" & cSex & "', "  & _

      " Orgtype='" & cOrgType & "', Orgtypeothers='" & cOrgTypeOthers & "',office='" & cOffice & "',contactdetail='" & cContactDetail & "', " & _

      " address1='" & cAddress1 & "',address2='" & cAddress2 & "',address3='" & cAddress3 & "',city1='" & cCity1 & "',city2='" & cCity2 & "', " & _

      " Contact1='" & cContact1 & "',Contact2='" & cContact2 & "',Contact3='" & cContact3 & "', " & _

      " city3='" & cCity3 & "',country1='" & cCountry1 & "',country2='" & cCountry2 & "',country3='" & cCountry3 & "',zip1='" & nPostalcode1 & "', " & _

      " zip2='" & nPostalcode2 & "',zip3='" & nPostalcode3 & "',telephone1='" & nPhone1 & "',telephone2='" & nPhone2 & "',telephone3='" & nPhone3 & "', " & _

      " fax1='" & nFax1 & "',fax2='" & nFax2 & "',fax3='" & nFax3 & "',email1='" & Email1 & "',email2='" & Email2 & "',email3='" & Email3 & "', " & _

      " website='" & cWebsite & "',ap='" & cNetworkType1 & "',swm='" & cNetworkType2 & "',ws='" & cNetworkType3 & "',memtype='" & cMembership & "', " & _

      " username='" & cUsername & "',password12='" & cPassword & "',secquestion='" & cSecurityQues & "',secanswer='" & cSecurityRes & "'," & _          

      " M1= '" & sM1 & "', T1= '" & sT1 & "', T2= '" & sT2 & "', T3= '" & sT3 & "', NW= '" & sNW & "', P1= '" & sP1 & "', D1= '" & sD1 & "', " & _

      " ResourcePerson = '" & sResourcePerson & "', ProjectName= '" & sProjectName & "',SpeakerTopic = '" & sSpeakerTopic & "', TopicsSubject='" & sTopics & "', " & _

         " Approve= " & sApprove  & " where Username = " & cUser & ""

    *************************************************************

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

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'aaaorg'.

    /snpnetwork/RegupdatesqlM.asp, line 109

  • Egads

    Have you not heard of stored procedures!!

    Do a Response.Write before the execute to get the actual sql statement that's going to be executed. Copy this into Query Analyzer and try executing it there.

    Then read up on stored procedures and sql security

     

    --------------------
    Colt 45 - the original point and click interface

  • This will fail everytime any of your parameter data contains a single quote character. 

    For a quick solution, scrub your data for invalid characters and replace "'" with "''" (singlequote to doublesinglequote) prior to insert.

    The better answer: [see phillcart's response]

    -Mike Gercevich

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply