Code for comparing blob values

Ritesh Babu

Member
Hi Friends,

I am writing the post regarding the comparison of blob values of processing options and want to have your opinions and queries.

lpacBlobVal[0] = dsF983051.vrpodata.lpValue;
alSize[0] = dsF983051.vrpodata.lSize;

lpacBlobVal[1] = dsF5983051.vrpodata.lpValue;
alSize[1] = dsF5983051.vrpodata.lSize;

while ( (iCount < max(alSize[1],alSize[0])) && (iFlag!=1) )
{
/*String[0]=strtok(lpacBlobVal[0],"\n");
String[1]=strtok(lpacBlobVal[1],"\n");*/
if( lpacBlobVal[0][iCount] == '|' )
{
iLength++;
}
if ( lpacBlobVal[0][iCount] != lpacBlobVal[1][iCount] )
{
iFlag=1;
if( JDB_ClearSelection(hRequestF98306)!= JDEDB_PASSED )
{
jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, "78D", (LPVOID) NULL);
return ER_ERROR;
}

jdeNIDcpy(dsSelect.Item1.szDict,NID_OBNM);
jdeNIDcpy(dsSelect.Item1.szTable,NID_F98306);
dsSelect.Item1.idInstance=0;
jdeNIDcpy(dsSelect.Item2.szTable,"");
jdeNIDcpy(dsSelect.Item2.szDict,"");
dsSelect.Item2.idInstance=0;
dsSelect.lpValue=dsF983051.vrdstnm;
dsSelect.nValues=1;
dsSelect.nCmp=JDEDB_CMP_EQ;

if( !(JDB_SetSelection(hRequestF98306,&dsSelect,1,JDEDB_SET_REPLACE) ) )
{
jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, "78D", (LPVOID) NULL);
return ER_ERROR;
}

if( !(JDB_SelectKeyed(hRequestF98306,0,0,0)))
{
jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, "78D", (LPVOID) NULL);
return ER_ERROR;
}

while(JDB_Fetch(hRequestF98306,&dsF98306,0))
{
if(iCount2==iLength)
{
ParseNumericString(&lpDS->mnDetailLevelFlag,"1");
strcpy(lpDS->szVersionTitle,dsF983051.vrjd);
strcpy(lpDS->szProgramId,dsF983051.vrpid);
strcpy(lpDS->szVersion,dsF983051.vrvers);
strcpy((char *) &lpDS->ProcessingOptionTextString,(char *) &dsF98306.ptpotx);
memset( (void *)(&dsF98306), 0x00, sizeof(dsF98306) );
memset( (void *)(&dsSelect), 0x00, sizeof(dsSelect) );
break;
}
iCount2++;
}
iCount2=0;
}
iCount++;
}
 
Ritesh,
I am not getting the basic purpose of this post. If you are trying to get values from PO then there are functions available where you can directly get the values and compare instead writing from scratch.

Chan
 
Hullo Mr. Rana,

Although function is available to retrieve PO Text and values but if certain changes are done and during upgrade, these changes are over ride so, to keep the track of changed values is made simple and it helps in getting compared values. And sometimes blob value gets corrupted so, it helps in getting the earlier PO values.

And I am really thankful for your interest!!!

Please keep posting your suggestions...
Thanks,
Ritesh
 
Does it work for you??
Can you give me the exact details of function you wrote..
Thanks
 
Back
Top