PDB Database Classes - FAQ
Contact Us


Q. How do I use the PDB classes with an Appforge Database type definition?

A. The PDB Classes do not support a direct pass of a Database Type vars like in Appforge.  You have to do the update the long way:

Public Type typDynamicArrayData
    RecNo As String ' Record Number
    RecordType As Byte
    UpdateDate As Date
    DynamicArray As String
End Type

Dim aData As typDynamicArrayData
PDBReadRecord(dbHandle, VarPtr(aData))

You will need to do the following to accomplish the same things:

Set oByteStream = New PDBByteStream

' Reads the ByteStream for the PDB Record
oByteStream.ByteArray = oPDB.ReadNextByIndex(I, 0, 0, 0)
' Converts the ByteStream to an AppForge Record Format
Set oAppforgeData.AppforgeDefinition = oAppforgeHeader
Set oAppforgeData.ByteStream = oByteStream
' Updating the UDT
aData.RecNo = oAppforgeData.StringValue(1)
aData.RecordType = oAppforgeData.ByteValue(2)
aData.UpdateDate = oAppforgeData.DateValue(3)
aData.DynamicArray = oAppforgeData.StringValue(4)