Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002

    Unanswered: Windows Server Problem

    I've found a strange problem with mysql / myodbc / asp and Windows IIS server.

    The problem is that I can add new records to a table, but can not update records in a table. This is how I reproduce the problem, If the table has a feild of type "text" then when I am adding a new record to the table, all records are added, EXCEPT the feild of type "text", and if I try to UPDATE the same record, then I get the following error

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

    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

    /checkout_e_address.asp, line 32

    Line 32 is a recordset.update command (ASP).
    I've tryed using myodbc driver 2.50 and the new one 3.51, and the same problem persists.

    Now here is where it gets weird, I've tryed doing this from home, using my windows XP Professional PC as the IIS Server, and just writing a connection string that uses works (LINUX) based MySQL server, and it works perfecctly, I don't have a problem adding a new record or updating it either.

    So, the problem is definetly with the server at work, running Windows NT 4 Server, with Service pak 6.

    I am guessing that the problem will have something to do with Windows Drivers, or the IIS drives / dll's.

    Please give advice if you are able, PS here is the source code, I've left out the host and usernames, passwords for obvious reasons.

    <%@ Language=VBScript %>
    <% Response.Buffer = True %>


    set cnn = Server.CreateObject("ADODB.Connection")
    cnn.Open "driver={MySQL ODBC 3.51 Driver};server=" & MysqlServer & ";uid=" & UserName1 & ";pwd=" & PassWord1 & ";database=" & DataBaseName & ";option=35"

    set checkaddress_rs = server.createobject("adodb.recordset")
    checkaddresssql = "select * from tempdelivery where session = " & session.SessionID checkaddresssql, cnn, 3, 3

    if checkaddress_rs.EOF then
    checkaddress_rs("session") = session.SessionID

    end if

    checkaddress_rs("purchase_order_number") = Request.Form("purchase_order_number")
    checkaddress_rs("company") = Request.Form("company")
    checkaddress_rs("firstname") = Request.Form("firstname")
    checkaddress_rs("surname") = Request.Form("surname")
    checkaddress_rs("address") = Request.Form("address")
    checkaddress_rs("suburb") = Request.Form("suburb")
    checkaddress_rs("postcode") = Request.Form("postcode")
    checkaddress_rs("state") = Request.Form("state")
    checkaddress_rs("country") = Request.Form("country")
    checkaddress_rs("phone") = Request.Form("phone")
    checkaddress_rs("email") = Request.Form("email")
    checkaddress_rs("comments") = Request.Form("comments")
    if session("customer") <> "" then checkaddress_rs("customer") = session("customer")

    checkaddress_rs.Update <--- LINE 32

    ' CLEAN UP
    set checkaddress_rs = nothing

    set cnn = nothing
    response.Redirect("checkout_freight.asp?country=" & Request.Form("country"))

  2. #2
    Join Date
    Jul 2001

    You're getting an ODBC error with v3.5 and v2.5 drivers. I wondering if it's because you use the wrong options? myODBC indicates that we use option 16384+2+1 when using ASP/ADO and myODBC v2.5 drivers and option 2+1 when using ASP/ADO with myODBC v3.5 drivers. I work with VB6 ADO and myODBC v3.51 and set myODBC options to 16384+2.

Posting Permissions

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