After you have retrieve a single cell from a VTS column, create a function like the one below. Pass the record retrieved from the VTS retrieval to the function. The function then breaks apart the data elements and places them in parameters. For example the function below extracts, the UserId, Password, and Server From a composite record:
GetCompositeData(char * CompositeRecord)
{
/*** Take the Composite record and split it into it's three separate parts. The delimiter = '':'' ***/
char separators[] = '':'';
char * token;
/*** Use the strtok C function to break the Composite record at each '':'' ***/
token = (char *)strtok(CompositeRecord, separators); // Get the User ID
if (!token)
{
lr_output_message (''Composite record is invalid!'');
return( -1 );
}
lr_save_string(token, ''Userid'');
token = (char *)strtok(NULL, separators); // Get the Password
lr_save_string(token, ''Password'');
token = (char *)strtok(NULL, separators); // Get the first Server
lr_save_string(token, ''Server'');
return 0;
}