Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session.init error in VB.NET web service

Status
Not open for further replies.

UnBoricua

IS-IT--Management
Apr 26, 2006
1
US
I have developed a windows application in VB.NET 2005. The application works fine, as intended. I am converting some of that application's functionality into a web service (again VB.NET 2005). The code is basically the same but it fails when running as a web service. The error is: error #5 Procedure call or argument is not valid.

Following is the snippet of code to the point of failure (session.init)

Code:
    '
    ' Open and Compose views used by this Order Entry module.
    '
    Function OpenAndComposeOrderViews(ByRef myResult As String) As Boolean
        Dim tempText As String
        Dim lCount, lIndex As Integer

        Dim Status As Boolean

        Dim errNo$, errSrc$, errDesc$, Msg$

        'LogDebugMsg("IN OpenAndComposeOrderViews")
        Try
            ACCPACsession = New ACCPAC.Advantage.Session

        Catch ex As Exception
            tempText = "Error source: " & ex.Source & "  Message: " & ex.Message
            Utility.LogErrorMsg("20060421-11", "Function OpenAndComposeOrderViews", "Fatal error in New ACCPAC.Advantage.Session.", tempText)
            myResult = "New ACCPAC.Advantage.Session failure. " & tempText
            Return False

        End Try

        'LogDebugMsg("AFTER session")
        Try
            Status = ACCPACsession.Init("", "XX", "XX1000", "52A")

        Catch ex As Exception
            errNo$ = Str(Err.Number)
            errSrc$ = Err.Source
            errDesc$ = Err.Description
.
.
.

Any ideas anyone?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top