I have coded a program on my x86 development server that uses the find function - this works fine - the code that you see below works on an x86 PC.
When I try and run the program on an x64 server (win2008) it does not work.
It initally stopped at the Session.init
I overcame this by changing the active solution platform to X86 from any CPU
The program now passes this and now stops on the find.finder statement.
My open code is:
Dim procError As Boolean = False
Try
Session.Init("", "XY", "XY0001", "60A")
Catch ex As Exception
MsgBox("Init Error = " & accpacdbase)
procError = True
End Try
Try
Session.Open("ADMIN", "ADMIN", accpacdbase, System.DateTime.Today, 0, "")
Catch ex As Exception
MsgBox("Open problem " & System.DateTime.Today)
procError = True
End Try
Try
mDBLinkCmpRW = Session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)
Catch ex As Exception
MsgBox("DatabaseLink error:" & ex.Message)
End Try
My Find Code is:
Dim oFind As AccpacFinder.ViewFinder
Dim SearchArray() As Object = {1, 14} (I have tried Integer here)
Dim DisplayArray() As Object = {1, 14}
Dim ReturnArray() As Object = {1, 14}
Try
Me.Cursor = Cursors.WaitCursor
oFind = New AccpacFinder.ViewFinder
oFind.Session = Session
oFind.ViewID = "AR0024"
oFind.ViewOrder = 0
oFind.SearchFieldIDs = SearchArray
oFind.DisplayFieldIDs = DisplayArray
oFind.ReturnFieldIDs = ReturnArray
oFind.Filter = ""
oFind.Finder() (THIS IS WHERE THE ERROR OCCURS)
The error message is:
System.Runtime.InteropServices.COMException occurred
ErrorCode=-2147467259
Message="Error HRESULT E_FAIL has been returned from a call to a COM component."
Source="Interop.AccpacFinder"
StackTrace:
at AccpacFinder.ViewFinderClass.Finder()
at IDL_0002_COL_ACC_IC_S.IDL_0002_Frm1.btnFindCustomer_Click(Object sender, EventArgs e) in J:\IDL Programs\Colex-New\IDL-0002-SQL-Live-Test\IDL-0002-COL-ACC-IC-S\IDL_0002_Frm1.vb:line 2116
InnerException:
Can anybody tell what I need to do to get this to work on an X64 PC ?????
When I try and run the program on an x64 server (win2008) it does not work.
It initally stopped at the Session.init
I overcame this by changing the active solution platform to X86 from any CPU
The program now passes this and now stops on the find.finder statement.
My open code is:
Dim procError As Boolean = False
Try
Session.Init("", "XY", "XY0001", "60A")
Catch ex As Exception
MsgBox("Init Error = " & accpacdbase)
procError = True
End Try
Try
Session.Open("ADMIN", "ADMIN", accpacdbase, System.DateTime.Today, 0, "")
Catch ex As Exception
MsgBox("Open problem " & System.DateTime.Today)
procError = True
End Try
Try
mDBLinkCmpRW = Session.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY, tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)
Catch ex As Exception
MsgBox("DatabaseLink error:" & ex.Message)
End Try
My Find Code is:
Dim oFind As AccpacFinder.ViewFinder
Dim SearchArray() As Object = {1, 14} (I have tried Integer here)
Dim DisplayArray() As Object = {1, 14}
Dim ReturnArray() As Object = {1, 14}
Try
Me.Cursor = Cursors.WaitCursor
oFind = New AccpacFinder.ViewFinder
oFind.Session = Session
oFind.ViewID = "AR0024"
oFind.ViewOrder = 0
oFind.SearchFieldIDs = SearchArray
oFind.DisplayFieldIDs = DisplayArray
oFind.ReturnFieldIDs = ReturnArray
oFind.Filter = ""
oFind.Finder() (THIS IS WHERE THE ERROR OCCURS)
The error message is:
System.Runtime.InteropServices.COMException occurred
ErrorCode=-2147467259
Message="Error HRESULT E_FAIL has been returned from a call to a COM component."
Source="Interop.AccpacFinder"
StackTrace:
at AccpacFinder.ViewFinderClass.Finder()
at IDL_0002_COL_ACC_IC_S.IDL_0002_Frm1.btnFindCustomer_Click(Object sender, EventArgs e) in J:\IDL Programs\Colex-New\IDL-0002-SQL-Live-Test\IDL-0002-COL-ACC-IC-S\IDL_0002_Frm1.vb:line 2116
InnerException:
Can anybody tell what I need to do to get this to work on an X64 PC ?????