sx_RecToString

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_RecToString

VB Declaration

Declare Function sx_RecToString Lib "Apollo9.dll"

(cpRecStruct As Any,  

ByVal iLength As Integer)

As String

Description

Converts a reference to a record structure into a Visual Basic string.

Parameters

cpRecStruct: A pointer to a defined record structure (typedef) that contains a pseudo xBase record. The record is made up of fixed string elements (see example below).

iLength: The length of the record structure. Pass this parameter as the Visual Basic LEN() function.

Return Value

A Visual Basic String representation of a Visual Basic record type.

VB Example

Type RecordDef

Cust As String * 6

Last As String * 26

Company As String * 31

City As String * 20

End Type

Dim hRec As RecordDef

 

sx_CloseAll

DirName$ = App.Path + "\"

CustArea = sx_Use(Dirname$ + "sxcust.dbf", "cust", READWRITE, SDENTX)

sRecStr$ = sx_RecToString(hRec, Len(hRec))