Automation Error in VB6.0 and SQL2K

  • Hi, I receive an AUTOMATION ERROR - ROOT TRANSACTION TRIED TO COMMIT BUT FAILED error when i try to connect to the backend(SQL2k) thru COM+ from VB6.0 Please help


    Regards,
    Genie Cool

  • might be best for you to post to a vb developer forum, but nonetheless is it possible for you to post your code


    Everything you can imagine is real.

  • Hi, I use this in the front end

    Set f_objLabCenter = CreateObject("BO_LabCentre.ClsLaboratory", g_strCOMRepository)

        

        l_iStatus = f_objLabCenter.FetchResultInv(g_strConnection, g_strUserId, f_sPatID, f_sOtherInv, f_sErrMsg)

    and this in the Business objects where i pass the inputs to the SP to the COM object and retrieve the same from the same function

    Dim l_adorsPatProfile       As ADODB.Recordset

       

    On Error GoTo errHndlr

        Set l_adorsPatProfile = New ADODB.Recordset

        With i_adocomProfile

            .CommandType = adCmdStoredProc

            .CommandText = "CDC_LAB_PR127_FETCH_PATVISITS"

            .Parameters.Append .CreateParameter("@i_sOpId", adVarChar, adParamInput, 32, i_sOpId)

            .Parameters.Append .CreateParameter("@i_dtDOV", adDBTimeStamp, adParamInput, , Format(i_sDov, CONST_DATE_FORMAT))

            l_adorsPatProfile.CursorType = adOpenDynamic

            l_adorsPatProfile.LockType = adLockReadOnly

            Set l_adorsPatProfile = .Execute

        End With

    If l_adorsPatProfile.State = adStateOpen Then

            l_iCounter = 1

            Do While (Not l_adorsPatProfile Is Nothing)

                If l_adorsPatProfile.EOF = False Then

                    If UCase(l_adorsPatProfile(0)) <> CONST_ERR_HEADER Then

                        Select Case l_iCounter

                            Case 1:

                                    o_sPatientInfo = l_adorsPatProfile.GetString(adClipString, , CONST_FIELD_DELIM) ......................... and so on

    The connection string is taken from the Configuration file. and also the DSN name.


    Regards,
    Genie Cool

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

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