I'm trying to extract data from tables in the database Sage 50 CA 2016, with a Visual Basic application that uses the SDK Sage 50 CA (Simply.ConnectionManagerService.dll).
I'm using the function "wSDBSelectRecords" to extract the data And then I 'm using the function "wSDBFetchRecord" to read data, but I do not know how I can access the readed data, or if stored in a temporary variable. If anyone knows how to read the data correctly and effectively with the SDK in Visual basic .NET way , I appreciate your help .
I attached the code I am using for reading the data:
Public Declare Function wSDBSelectRecords Lib "Sage_SA_dblyr.dll" (ByVal wDBLinkNo As Short, ByVal wTBLinkNo As Short, ByVal pszFilter As String, ByVal wKey As Short, ByVal wFlags As Boolean) As Short
Public Declare Function wSDBFetchRecord Lib "Sage_SA_dblyr.dll" (ByVal wDBLinkNo As Short, ByVal wTBLinkNo As Short, ByVal pRecord As Byte(), ByVal wFetch As Short, ByVal pFetched As Byte()) As Short
Dim pCount As Short
Dim pRecord2(1999) As Byte
Dim pFetched(1999) As Byte
Call wSDBSelectRecords(iDBLink, iTBLink, "", 0, True)
Call wSDBFetchRecord(iDBLink, iTBLink, pRecord2, pCount, pFetched)