The Initiate method of xBrowse executes SetRDD, because nDataType is DATATYPE_RDD, though SetArray or SetADO is already used. Execution of SetRDD in such cases is not necessary and seems logically not so appropriate, though SetRDD does not disturb the existing assignments of codeblocks. The relevant part of the Initiate method is given below
Code: Select all
do case
case ::nDataType == DATATYPE_RDD
::SetRDD()
otherwise
MsgStop("Data type not supported", "TXBrowse class")
end case
Keeping this in view, it is suggested for consideration that the above lines in the initiate method may be changed as :
Code: Select all
if ::nDataType == DATATYPE_RDD
::SetRDD()
endif
New defines :
#define DATATYPE_ADO 2
#define DATATYPE_USER 9
can be added and SetArray can assign ::nDataType := DATAYPE_ARRAY and SetAdo can assign ::nDataType := DATATYPE_ADO.
This will also help the application program to retrieve the value of ::nDataType for meaningful use as may be appropriate.