Hello everyone,
I have development experience creating DLLs and .NET assemblies as well as ASP and ASP.NET web pages.
The reason I am writing is because I am having difficulty with the ACCPAC xapi/comi dlls and getting them to work in a .NET assembly.
I have been able to create objects and browse views using the xapi inside a .asp page without any trouble, but I want to encapsulate this logic in a dll and I am not having problems.
I am coding in VB.NET and some sample code would be:
When I create an object that contains this code the page loads for about 15 seconds then comes up with the following error:
Error Type:
Microsoft Active Server Pages (0x80004005)
The "Session" object was not opened.
/xapitest/xapitest.asp, line 4
sample xapitest.asp code is as follows:
I am not sure why I am getting these errors, but there is very little support in the way of documentation and I noticed there were a few developers on this forum with a good amount of knowledge. If possible can you please write me back and point me in the right direction?
Thanks
-A
I have development experience creating DLLs and .NET assemblies as well as ASP and ASP.NET web pages.
The reason I am writing is because I am having difficulty with the ACCPAC xapi/comi dlls and getting them to work in a .NET assembly.
I have been able to create objects and browse views using the xapi inside a .asp page without any trouble, but I want to encapsulate this logic in a dll and I am not having problems.
I am coding in VB.NET and some sample code would be:
Code:
Dim theSession As AccpacSession
Sub Login(ByVal Username, ByVal Password, ByVal Database)
Try
theSession.Open("ADMIN", "ADMIN", "SAMINC", dNow, 0)
Catch ex As Exception
retVal = retVal & "Error Initializing the Session." & _
theSession.Errors.Item(0).ToString
theSession.Errors.Clear()
End Try
End Sub
When I create an object that contains this code the page loads for about 15 seconds then comes up with the following error:
Error Type:
Microsoft Active Server Pages (0x80004005)
The "Session" object was not opened.
/xapitest/xapitest.asp, line 4
sample xapitest.asp code is as follows:
Code:
Set ACCPAC = Server.CreateObject("Test.Test")
ACCPAC.Login("ADMIN", "ADMIN", "SAMINC")
Thanks
-A