Hi
If anyone is interested, here's a function that converts the good old RECNUM to a ROWID
I generally use to when populating a cCJGrid via an SQL Statement - when the dataSource RowId needs to be populated.
Usage:
Get SQLColumnValue Of hstmt 1 To iRecnum
Get CreateDataSourceRow of hoDataSource to aRowData
Move (DFRecnumToRowId(iRecnum)) to aRowData.riID
Code:
Function DFRecnumToRowId Global Integer iDec Returns RowID
String sHex
String sRet
Integer iCnt
Move "" to sHex
While (iDec>0)
Move (Mid("0123456789ABCDEF", 1, ((iDec iand |CI$0F) + 1)) + sHex) to sHex
Move (iDec / 16) to iDec
Loop
If (sHex="") Move "0" to sHex
Move (Lowercase(Right("00000000"+sHex,8))) to sHex
For iCnt from 1 to 4
Move (Insert(Mid(sHex,2,(iCnt*2)-1),sRet,1)) to sRet
Loop
Function_Return (DeserializeRowID(sRet))
End_Function