Board index » delphi » IBX 5.04 Bug?

IBX 5.04 Bug?


2003-11-21 08:37:35 AM
delphi197
Hi All:
Symptom: Randomly/intemitently AV when loading data to TIBQuery if runtime
set fixedchar = false with the following code
procedure Trdm1.IBQrySearchAfterOpen(DataSet: TDataSet);
var
i : integer;
begin
inherited;
with DataSet do
begin
for i := 0 to Fields.Count - 1 do
if Fields[i] is TStringField then
TStringField(Fields[i]).FixedChar := false;
end;
end;
Fixes:
procedure Trdm1.IBQrySearchAfterOpen(DataSet: TDataSet);
var
i : integer;
begin
inherited;
with DataSet do
begin
for i := 0 to Fields.Count - 1 do
if Fields[i] is TStringField then
if TStringField(Fields[i]).DataType = ftFixedChar then
TStringField(Fields[i]).FixedChar := false;
end;
end;
Roland Zhang
 
 

Re:IBX 5.04 Bug?

Go to QC. The workaround is placed there (2934). Yes this was introduced in
5.04 and fixed in the x.05 and up, but D5 has not gotten rev'd since the 5.04
release (there are still plans, but not before I complete IBX for .NET due to
time).
Roland writes:
Quote

Hi All:

Symptom: Randomly/intemitently AV when loading data to TIBQuery if runtime
set fixedchar = false with the following code

procedure Trdm1.IBQrySearchAfterOpen(DataSet: TDataSet);
var
i : integer;
begin
inherited;
with DataSet do
begin
for i := 0 to Fields.Count - 1 do
if Fields[i] is TStringField then
TStringField(Fields[i]).FixedChar := false;
end;
end;

Fixes:
procedure Trdm1.IBQrySearchAfterOpen(DataSet: TDataSet);
var
i : integer;
begin
inherited;
with DataSet do
begin
for i := 0 to Fields.Count - 1 do
if Fields[i] is TStringField then
if TStringField(Fields[i]).DataType = ftFixedChar then
TStringField(Fields[i]).FixedChar := false;
end;
end;

Roland Zhang
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
If there is somebody up there could they throw me down a line. Just a
little helping hand just a little understanding. Just some answers to the
questions that surround me now. If there's somebody up there could
they throw me down a line. (Fish)