What do you mean actual row number? Row number should be independent of the data in the datawindow or datastore.
If you have code that's row number dependent, you should really consider changing to code to do a Find base on a key field(s), or some other unique piece of data.
If you can't do this for some reason, you could create a dummy column in your select, and immediately after the initial retrieve, fill it in with row number like this:
add "cast(0 as integer) as fake_row" to you select statement (note: your db may need different style of cast statment)
dw_1.retrieve()
long ctr
for ctr = 1 to dw_1.rowcount()
dw_1.setitem(ctr, "fake_row", ctr)
next
No matter how you change sort order, or filters, the "fake_row" column will always contain the original row number (unless you do something that requires a reselectrow, in which case you'll need to save off the original value and restore it afterwards).
What I am looking how I can keep the orginal row number after retrieval of datawindow, if datawindow is filter, sort or delete records, without creating physical column or dummy column in the sql
Regards
Antony
So have you tried GetRowIDFromRow/GetRowFromRowID? GetRowIDFromRow should give you the unique row identifier after retrieve. GetRowIDFromRow will return the original id regardless of which buffer you access.
Cheers.
Best Regards,
Ricardo