As you may see from my posts, I am not developing a software handling with Oracle database, it gives user's ability to use difference scripts to data-mining the raw data, and prevent them vividly to final user.
User can uses TeeChart build-in ChartEditor, at run-time, try different fields in script result dataset for different series And user can save the above datasource field binding, reload at a later time.
Then I found some AV errors, for no-existing field in following cases:
1. load the series setting while data is not actived
2. or user is changing/trying a new scripts without changing the series setting at the same time.
So, from a user-friendly and robust code point of view, I modified following source code, and would like to contribute to you:
DBChart.pas
Code: Select all
Function GetAField(Const FieldName:String):TField;
begin
if FieldName='' then result:=nil
else result:=tmp.FindField(FieldName);// changed from
//FieldByName(FieldName)