> Hello, > > I want to implement warning system on locked data. So I need > detect id and > user of locked row. I have found that field rowidhex in locks > table contains > id of locked row. > The problem is I don't know how to extract id in java. > Could anyone give me an example in java how to do this ?
Good Idea, but it may be a little bit more tricky than you may think: * the column has a length of 64 bytes, so it may be only the prefix of the key, not an exact match. * if the primary key is combined from two or more columns, the 'rowidhex' field contains the collation of the key colum data, in the order determined by the ordering of the 'keypos' value in the 'columns' system table. Again if this is longer that 64 bytes it is truncated anywhere in between. * if you did not specify a key for a table, the rowid you see is an artificial value, and has generally no much worth as you do not see it anywhere. * the data itself is in internal representation, which require an additional conversion before usable e.g. as select parameter, or printable parameter. * You might be careful when later using the extracted key - depending on the lock (exclusive/share) the access to row is limited. If you are still interested, you may go from here to the description of the internal format shown here too, see http://sapdb.2scale.net/moin.cgi/NetworkProtocol the spec describes the internal format starting a p. 75. Good Luck Alexander Schr�der SAP Labs Berlin > > > > > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
