PB 2019 Build 2170. The following code gives -1 from the RowsCopy. The datawindow ldw_Export has 161 rows with 297 columns. The first 14 columns are string or long, the remainder are decimal(2).
ldw_Export is a reference to a visible DataWindow on a different window that was passed inside a generic references object. Our app suffers from excessive object orientation.
DataWindow ldw_Export, ldw_Filtered
... code to set ldw_Export to a datawindow control ...
ldw_Filtered = Create DataWindow
ldw_Filtered.DataObject = ldw_Export.DataObject
li_rc = ldw_Export.RowsCopy(1, ldw_Export.RowCount(), &
Primary!, ldw_Filtered, 1, Primary!)
It seems simple enough, why wouldn't this work?