AdsFindNextTable

Advantage Client Engine

 

Finds the next table matching the file mask provided in a previous call to AdsFindFirstTable.

Syntax

UNSIGNED32 ENTRYPOINT AdsFindNextTable( ADSHANDLE hConnect,

SIGNED32 lHandle,

UNSIGNED8 *pucFileName,

UNSIGNED16 *pusFileLen );

Parameters

hConnect (I)

Handle of connection.

lHandle (I)

Find handle from a call to AdsFindFirstTable.

pucFileName (O)

Next matching tablename is returned in this buffer.

pusFileLen (I/O)

Length of pucFileName on input, length of returned data on output.

Special Return Codes

AE_NO_FILE_FOUND

No tables were found.

Remarks

Use AdsFindNextTable to continue a search started with the AdsFindFirstTable API.

Call AdsFindClose when your work with the find handle (lHandle) is complete.

Example

usLen = ADS_MAX_TABLE_NAME;

strcpy( (char*)aucTableMask, "x:\\data\\*.adt" );

ulRetVal = AdsFindFirstTable( hConn, aucTableMask, aucTable,

&usLen, &hFindHandle );

if ( (ulRetVal != AE_NO_FILE_FOUND) && (ulRetVal != AE_SUCCESS) )

return ulRetVal;

 

while ( ulRetVal != AE_NO_FILE_FOUND )

{

// Do your work with the tablename, which is now in the aucTable buffer.

 

// now get the next table

usLen = ADS_MAX_TABLE_NAME;

ulRetVal = AdsFindNextTable( hConn, hFindHandle,

aucTable, &usLen );

if ( (ulRetVal != AE_NO_FILE_FOUND) && (ulRetVal != AE_SUCCESS) )

return ulRetVal;

}

 

AdsFindClose( hConn, hFindHandle );

See Also

AdsFindFirstTable

AdsFindClose

AdsFindFirstTable62

AdsFindNextTable62