SAGE 300 61A SDK HRESULT E_FAIL Error

Hi Guys,

I have an issue when attempting to retrieve or insert data into SAGE databases using the SDK 61A.
I am able to establish connection with the SAGE database and open the Views.
However, I am getting a HRESULT E_FAIL error when I try to retrieve or insert data into SAGE 300 2012.

Please see the code below:

Public Function fSageTest() As Boolean
Dim sSession As AccpacCOMAPI.AccpacSession
Try
sSession = New AccpacCOMAPI.AccpacSession
sSession.Init("", "XY", "XY1000", "61A")
sSession.Open("ADMIN", "", "HYLDAT", DateTime.Now, 0, String.Empty)
'
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Dim vStockItems As AccpacCOMAPI.AccpacView
'
mDBLinkCmpRW = sSession.OpenDBLink(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_COMPANY, AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)
mDBLinkCmpRW.OpenView("IC0310", vStockItems)
'
vStockItems.Init()
vStockItems.Browse("SELECT [ITEMNO], [DESC], [CATEGORY] FROM ICITEM ", True)

While (vStockItems.Fetch())
''Do Something
End While

Catch ex As Exception
fErr("fSageTest", 0)
Return False
Finally
If Not sSageSession Is Nothing Then
sSageSession.Close()
End If
End Try
End Function

The error is thrown when when executing the highlighted line.

I am missing something?
Could you please assist.
I tried with both SDKs 61A and 62A wth same result.

Complete error as below:

System.Runtime.InteropServices.COMException was caught
ErrorCode=-2147467259
Message="Error HRESULT E_FAIL has been returned from a call to a COM component."
Source="Interop.AccpacCOMAPI"
StackTrace:
at AccpacCOMAPI.AccpacViewClass.Browse(String Filter, Boolean Ascending)
at RICGMobilePlusCentre.clsSAGE300.fSAGETest()
InnerException: