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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AccpacSession.Init Error 1.2796.37

Status
Not open for further replies.

klaussang

Programmer
Jun 18, 2009
6
CN
When I use AccpacCOMAPI in ACCPAC 5.3, the AccpacSession.Init method cause an Exception, the error message is "1.2796.37"

The Code:

Public session As AccpacCOMAPI.AccpacSession

Public Sub InitSession(ByVal adminpassword As String, ByVal company As String)
session = New AccpacCOMAPI.AccpacSession
session.Init("", "AS", "AS3001", "53A") 'Exception here
session.Open("ADMIN", adminpassword, company, Date.Now, 0, "")
End Sub


How can i deal it?
 
I think you should have:
Code:
set session = New AccpacCOMAPI.AccpacSession
session.Init "", "XY", "XY0001", "53A"
session.open "ADMIN", adminpassword, company, Date.Now, 0, ""
 
.Clone is not work either.
Can you give me more detail?
 
My VB.NET code with .Clone, It's still cause the same Exception sometime.

Public session As AccpacCOMAPI.AccpacSession
Public Sub InitSession(ByVal company As String)
session = New AccpacCOMAPI.AccpacSession
Try
session.Init("", "AS", "AS3001", "53A")
Catch
session.Clone(company)
End Try
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top