6 67 2 C Example

LANSA Open Guide

6.67.2 C Example

BOOL fOK;

int  iSession;

char* strHexString;

char strWhere[ 256 ];

int bufferSize;

 

fOK = LceSetSelectOptions(iSession, "*RECEIVEIMMED");

bufferSize = LceUnicodeToHex( strString, NULL, 0 );

strHexString = malloc( bufferSize )

fOK = LceUnicodeToHex( strString, strHexString, bufferSize );

sprintf( strWhere, "NAME = %s", strHexString );

fOK = LceRequestSelectWhere(iSession, "EMPNO,SALARY","WORKERS", 

"",strWhere,FALSE);

free(strHexString);