on 09-08-2014 7:39 AM
Hallo Experts ,
I encounter this error " An attempt was made to reference a token that does not exit" every time i run an addon i have created . I have also looked at this link and adopted Owen Slater Mar 11, 2007 9:20 PM response marked as correct answer so i added the Thread.Sleep(10) as shown in my code but nothing happens . Kindly help .
Public Sub SetApplication()
'*******************************************************************
'// Use an SboGuiApi object to establish connection
'// with the SAP Business One application and return an
'// initialized appliction object
'*******************************************************************
Dim SboGuiApi As New SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
SboGuiApi = New SAPbouiCOM.SboGuiApi
'// by following the steps specified above, the following
'// statment should be suficient for either development or run mode
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
'// connect to a running SBO Application
Try ' If there's no active application the connection will fail
SboGuiApi.Connect(sConnectionString)
'Suggestion to given in this link
Thread.Sleep(10)
Catch ' Connection failed
System.Windows.Forms.MessageBox.Show("No SAP Business One Application was found")
End
End Try
'// get an initialized application object
SBO_Application = SboGuiApi.GetApplication()
End Sub
Hi Kennedy,
1. Which SBO Version are you using ? x86 or x64 ?
2. Which target platform are you using in your Visual Studio ?
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kennedy,
I would get this error if your SBO client and VS platform is different and you have both SBO 32 bit and 64 bit installed on this machine.
But if you say you have both x86, that is strange.
1. Can you check on the connectionstring value and post it here ?
2. Does this happen during development or on client ?
Regards
Edy
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.