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

Starting xAPI session in VB.NET

Status
Not open for further replies.

qiw360

Programmer
Feb 10, 2004
12
0
0
CA
Hi, I am trying to program xAPI using VB.NET and is having a hard time to open an xapi session in .NET. I try the following simple codes, it compiled successfully. But I got a run-time error. Any idea? Thanks a lot.

The codes I tried:

Module Module1

Sub Main()
Dim Session As New ACCPACXAPILib.xapiSession
Session.Open("ADMIN", "admin", "HORDAT", Now.Date, 0)
End Sub
End Module


Stack trace:

ConsoleApplication1.exe!ConsoleApplication1.Module1.Main() Line 5 + 0x5e bytes Basic

Module trace:

mscorlib.dll c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll 1 1.1.4322.573 [160] ConsoleApplication1.exe 2/21/2003 7:26 AM No symbols loaded.

ConsoleApplication1.exe C:\vb\ConsoleApplication1\bin\ConsoleApplication1.exe 2 1.0.1501.24208 [160] ConsoleApplication1.exe 2/10/2004 1:31 PM Symbols loaded.

interop.accpacxapilib.dll c:\vb\consoleapplication1\bin\interop.accpacxapilib.dll 3 1.1.0.0 [160] ConsoleApplication1.exe 2/10/2004 1:28 PM No symbols loaded.

microsoft.visualbasic.dll c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll 4 7.10.3052.4 [160] ConsoleApplication1.exe 2/9/2004 10:23 AM No symbols loaded.

 
Check out thread631-674630 for a discussion on VB.net and the xAPI. It may be able to help you. Take note of the section that says you need at least ACCPAC 5.1 with SP2.

Take Care,

zemp

"If the grass looks greener... it's probably because there is more manure."
 
Thanks a lot, Zemp. The thread your pointed to me is very good. You mentioned on that thread that ACCPAC 5.1 SP2 or later got its own .NET libraries. The version of Accpac on which I am working is 5.2 (with all service packs). But I have no idea where is the .NET libraries.

qing
 
To be honest, neither do I. I have yet to switch from VB 6 to VB.Net.

Take Care,

zemp

"If the grass looks greener... it's probably because there is more manure."
 
Hi, Zemp. Now I can actually open an accpacxapi session from VB.NET! What I did is:

1. add xapi liberary into the project(Project -> Add Reference -> COM -> ACCPACXAPI 1.1 Type Liberary)

2. Open the session
Sub Main()
Dim Session As New ACCPACXAPILib.xapiSession
Session.Open("ADMIN", "ADMIN", "HORDAT", Now.Date, 0)
End Sub

So, may be all needed to do is adding the ACCPACXAPI 1.1 Type Library.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top