Bug in TBDEDataset.Locate ?

Whenever I do a aBDEDatset.Locate(sKeyFields,sVal,[]) using an Oracle 7.3
database,
all filtered TBDEDatasets using the same TDatabase as aBDEDataset suddenly
return
EOF after Refresh/Open when sKeyFields <> aBDEDataset.IndexFieldNames and
sVal = ''
(empty string) (D4 SR3, BDE 5.01).
The problem is, I discovered this very late, so I need to add tests for
val='' at
every line where I call Locate... Is there any other way to work around this
?

bjoern

-------TestLocate.pas--------
{ Database for This Code : Oracle7.3, Login :  SCOTT/TIGER, BDE-Alias
'SCOTT' required }
unit TestLocate;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Grids, DBGrids, ExtCtrls, Db, DBTables, DBCtrls;
type TForm1 = class(TForm)
Panel2: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Database1: TDatabase;
Table1: TTable;
DataSource1: TDataSource;
Table2: TTable;
DataSource2: TDataSource;
Panel6: TPanel;
Panel3: TPanel;
Label1: TLabel;
Button3: TButton;
Edit1: TEdit;
Button1: TButton;
DBGrid1: TDBGrid;
Panel7: TPanel;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Button2: TButton;
DBGrid2: TDBGrid;
DBNavigator1: TDBNavigator;
DBNavigator2: TDBNavigator;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
end;
var Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject); begin Table1.Filter :=
Edit1.Text; Table1.Filtered := True; end;
procedure TForm1.Button2Click(Sender: TObject); begin
Table2.Locate(Edit2.Text,Edit3.Text,[loCaseInsensitive,loPartialKey]); end;
procedure TForm1.Button3Click(Sender: TObject); begin Table1.Active := not
Table1.Active; end;
procedure TForm1.Button4Click(Sender: TObject); begin Table2.Active := not
Table2.Active; end;
end.
------TestLocate.dfm--------
object Form1: TForm1
Left = 316
Top = 407
Width = 585
Height = 404
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Panel2: TPanel
Left = 0
Top = 0
Width = 577
Height = 377
Align = alClient
BevelOuter = bvNone
TabOrder = 0
object Panel4: TPanel
Left = 0
Top = 0
Width = 577
Height = 377
Align = alClient
BevelOuter = bvNone
TabOrder = 0
object Panel5: TPanel
Left = 328
Top = 0
Width = 249
Height = 377
Align = alRight
BevelOuter = bvLowered
BorderWidth = 8
TabOrder = 0
object Panel7: TPanel
Left = 9
Top = 9
Width = 231
Height = 70
Align = alTop
BevelOuter = bvNone
TabOrder = 0
object Label2: TLabel
Left = 8
Top = 1
Width = 45
Height = 13
Caption = 'KeyFields'
end
object Label3: TLabel
Left = 9
Top = 25
Width = 45
Height = 13
Caption = 'KeyValue'
end
object Edit2: TEdit
Left = 56
Top = 1
Width = 169
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
Text = 'LOC'
end
object Edit3: TEdit
Left = 56
Top = 25
Width = 169
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
end
object Button2: TButton
Left = 140
Top = 49
Width = 85
Height = 17
Caption = 'Test Locate'
TabOrder = 2
OnClick = Button2Click
end
object Button4: TButton
Left = 0
Top = 53
Width = 65
Height = 17
Caption = 'Open/Close'
TabOrder = 3
OnClick = Button4Click
end
end
object DBGrid1: TDBGrid
Left = 9
Top = 79
Width = 231
Height = 271
Align = alClient
DataSource = DataSource2
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object DBNavigator2: TDBNavigator
Left = 9
Top = 350
Width = 231
Height = 18
DataSource = DataSource2
Align = alBottom
Flat = True
TabOrder = 2
end
end
object Panel6: TPanel
Left = 0
Top = 0
Width = 328
Height = 377
Align = alClient
BevelOuter = bvLowered
BorderWidth = 8
TabOrder = 1
object Panel3: TPanel
Left = 9
Top = 9
Width = 310
Height = 70
Align = alTop
BevelOuter = bvNone
TabOrder = 0
object Label1: TLabel
Left = 1
Top = 1
Width = 22
Height = 13
Caption = 'Filter'
end
object Button3: TButton
Left = 0
Top = 53
Width = 65
Height = 17
Caption = 'Open/Close'
TabOrder = 0
OnClick = Button3Click
end
object Edit1: TEdit
Left = 25
Top = 1
Width = 280
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
Text = 'JOB = '#39'CLERK'#39
end
object Button1: TButton
Left = 212
Top = 24
Width = 93
Height = 17
Caption = 'Set Filter'
TabOrder = 2
OnClick = Button1Click
end
end
object DBGrid2: TDBGrid
Left = 9
Top = 79
Width = 310
Height = 271
Align = alClient
DataSource = DataSource1
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
object DBNavigator1: TDBNavigator
Left = 9
Top = 350
Width = 310
Height = 18
DataSource = DataSource1
Align = alBottom
Flat = True
TabOrder = 2
end
end
end
end
object Database1: TDatabase
AliasName = 'SCOTT'
Connected = True
DatabaseName = 'TheDatabase'
Params.Strings = (
'USER NAME=SCOTT')
SessionName = 'Default'
Left = 480
Top = 104
end
object Table1: TTable
Active = True
DatabaseName = 'TheDatabase'
TableName = 'EMP'
Left = 480
Top = 136
end
object DataSource1: TDataSource
DataSet = Table1
Left = 512
Top = 136
end
object Table2: TTable
Active = True
DatabaseName = 'TheDatabase'
TableName = 'DEPT'
Left = 481
Top = 169
end
object DataSource2: TDataSource
DataSet = Table2
Left = 512
Top = 169
end
end