Unable to Complete Transaction in Market Sample Store

ID: Q214426


The information in this article applies to:
  • Microsoft Site Server version 3.0, Commerce Edition


SYMPTOMS

After you install MDAC 2.1 in a Commerce Server 3.0 environment, you may encounter one of the following errors when you attempt to complete a purchase in the Microsoft Market Starter Site.

ODBC Error "Changed language setting to 'us_english'"

ODBC Error "Changed database context to master"
MDAC 2.1 ships with SQL Server 7.0 as a mandatory install. Therefore installing SQL Server 7.0 on your Web server can produce the errors listed above. Installing SQL Server 7.0 on a remote computer should not produce this problem.


CAUSE

The version of ADO that ships in MDAC 2.1 passes on some informational messages from ODBC to ASP applications that were not passed on in previous versions of ADO. The error handling code provided in the Market Starter Site detects these informational messages and incorrectly displays them as errors.


RESOLUTION

To resolve this problem, apply the latest Site Server 3.0 service pack.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Site Server version 3.0. This problem has been corrected in the latest U.S. service pack for Microsoft Site Server version 3.0. For information on obtaining the service pack, query on the following word in the Microsoft Knowledge Base (without the spaces):

S E R V P A C K


MORE INFORMATION

  1. Open Reqinsert.vbs in Notepad.


  2. Locate the variable declaration section for SubmitReq function and add the following line to the declaration:
    Dim objErr, fErr


  3. Locate the two instances of Set RS = Connection.Execute in SubmitReq function.


  4. Replace the entire If … ElseIf… Else … End block that immediately follows Set RS = Connection.Execute with the following block:
    
    fErr = False
    
    If Err.Number <> 0 Then
    
     REM If an underlying object, and NOT the ADO, caused the error
     REM -2147217900 The command contained one or more errors
     REM -2147467259 Unspecified error
     If Err.Number = -2147467259 Or Err.Number = -2147217900 Then
      For Each objErr In Connection.Errors
    
       REM Checking for SQL-related errors
       If objErr.NativeError <> 5701 And objErr.NativeError <> 5703 And
    ObjErr.NativeError <> 0 Then
        Context.DBErrors(objErr.NativeError) = objErr.Description
         fErr = True
       End If
      Next
    
     REM If an ADO error
     Else
      orderform.[_purchase_errors].Add("#:" & Err.Number & "," &
    Err.Description)
      fErr = True
     End If
    End If
    
    If fErr Then
     SubmitReq = False
     Exit Function
    End If 


  5. Locate the variable declaration section for InsertItems function and add the following line to the declaration:
    Dim objErr, fErr


  6. Locate the instances of Set RS = Connection.Execute in InsertItems function.


  7. Replace the entire If … ElseIf … Else … End block that immediately follows Set RS = Connection.Execute with the following block:
    
    fErr = False
    
    If Err.Number <> 0 Then
    
     REM If an underlying object, and NOT the ADO, caused the error
     REM -2147217900 The command contained one or more errors
     REM -2147467259 Unspecified error
     If Err.Number = -2147467259 Or Err.Number = -2147217900 Then
      For Each objErr In Connection.Errors
    
       REM Checking for SQL-related errors
       If objErr.NativeError <> 5701 And objErr.NativeError <> 5703 And
    ObjErr.NativeError <> 0 Then
        Context.DBErrors(objErr.NativeError) = objErr.Description
         fErr = True
       End If
      Next
    
     REM If an ADO error
     Else
      orderform.[_purchase_errors].Add("#:" & Err.Number & "," &
    Err.Description)
      fErr = True
     End If
    End If
    
    If fErr Then
     InsertItems = False
     Exit Function
    End If 


  8. Save Reqinsert.vbs.


Keywords : SS3SP2Fix
Version : winnt:3.0
Platform : winnt
Issue type : kbbug


Last Reviewed: February 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.