Re: Re: Re: Getting Solomon .NET programming assistance? Manual? Help files?
Hi Toni,
I think I understand what your developer is asking.
There are two ways to work with data in the SDK. The first is to use a table buffer, which is a class that must inherit from SolomonDataObject. This is the version 7 replacement for dh files (still used on the VBA side). If you look in the VT module folder (assuming the SDK is installed) you can find all of the Solomon data object classes for the standard tables like you see for DH files. Both the SDOs and DH filed serve the same purpose - they are buffer containers for a database row. These are bound to the UI, or used unbound if desired. Sounds like your developer is already familiar with this.
For unbound data that needs to be handled by SL, you can just create a standalone unbound SDO class in the project. It is a fair amount of work to create, but this data structure can then be used in the standard SQL API calls as a row buffer.
If a single data value is needed, you can now use primitives directly instead of creating an SDO class. For example, if you just need to retrieve a count from a table, the following code will do it:
Dim bCount As Integer
Call sql(CSR_PJPROJ, "SELECT COUNT(project) FROM PJPROJ WHERE project=’abc’")serr1 = SGroupFetch1(CSR_PJPROJ, bCount)
Note that bCount is a straight integer variable created on the fly - no need for a separate SDO class. Works the same for single string values. If you peek in the VBTools module for the SQLFetch calls you can see that primitives are allowed.
In this example, no SQLCursorEx call was made for CSR_PJPROJ. For some reason SL didn't like it before SGroupFetch1 and would throw a 10202 error. There are a lot of quirks like that in the SDK.
Hope this helps.