code error ...

Results 1 to 2 of 2

Thread: code error ...

  1. #1
    Join Date
    Dec 1969

    Default code error ...

    Hi, <BR><BR>I am connecting to a SQL database. It actually adds the record correctly but come with the following error when it try to display the value: <BR><BR>Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. <BR><BR><BR>&#060;% <BR> Dim objRS <BR> Set objRS = Server.CreateObject("ADODB.Recordset") <BR> objRS.Open "tb_news", objConn, , adLockOptimistic, adCmdTable <BR> objRS.AddNew <BR> objRS("NEWSDATE") = Date <BR> objRS("HEADLINE") = Request.form("headline") <BR> objRS("CONTENT") = Request.form("content") <BR> objRS("CATEGORY") = Request.form("category") <BR> objRS("SOURCE") = Request.form("source") <BR><BR> objRS.Update <BR><BR>%&#062; <BR><BR>&#039;to list the updated value in HTML <BR><BR>&#060;%=objRS("NEWSDATE") %&#062; <BR>&#060;%=objRS("HEADLINE") %&#062; <BR>&#060;%=objRS("CONTENT") %&#062; <BR>&#060;%=objRS("CATEGORY") %&#062; <BR>&#060;%=objRS("SOURCE") %&#062; <BR><BR>do I have to use different syntax with ACCESS and SQL database? (above code working perfectly with ACCESS)..please help..<BR>Will be very grateful for any suggestion.... <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: code error ...

    That multi-step error is a bugger. I think it usually means you&#039;re trying to update a field with the wrong sort of value (eg. text into a numeric). I&#039;d check your form variables first and make sure what&#039;s being passed matches what&#039;s required by the DB.

Posting Permissions

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