Forum > Ported from Delphi/Kylix

UIB - Inactive Dataset

(1/1)

talorigomat:
I'm using Lazarus version 0.92 beta dated the 4/10/2004 with fpc version 1.9.5 dated 4/10/2004.

Although I've tried opening the dataset before connecting the datasource I still get the 'Operation Can't be performed on an inactive dataset' Error Message.

Below is the procedure I'm using:

procedure TForm1.Button1Click(Sender: TObject);
begin
db.connected:= true;
trn.database :=db;
dst.database := db;
dst.transaction := trn;
dst.sql.text :='select * from organisation';
dst.open;
dsr.dataset := dst;
end;

jesusr:

--- Quote from: "talorigomat" ---I'm using Lazarus version 0.92 beta dated the 4/10/2004 with fpc version 1.9.5 dated 4/10/2004.

Although I've tried opening the dataset before connecting the datasource I still get the 'Operation Can't be performed on an inactive dataset' Error Message.

Below is the procedure I'm using:

procedure TForm1.Button1Click(Sender: TObject);
begin
db.connected:= true;
trn.database :=db;
dst.database := db;
dst.transaction := trn;
dst.sql.text :='select * from organisation';
dst.open;
dsr.dataset := dst;
end;
--- End quote ---


This might be a problem in the current tdataset code, I reported to the maintainer about this and he sent me a patch which worked well. Probably the patch will be available in cvs soon. By the way, I sent a private message to you about this in the uib forum,

There is a chance that this is actually another problem, so please try to make the following change in jvuibdataset.pas:


--- Code: ---
function TJvUIBCustomDataSet.GetFieldData(Field: TField;
  Buffer: Pointer): Boolean;
begin
  //CheckActive;  // comment this line
  Result := GetFieldData(Field.FieldNo, Buffer);
end;

--- End code ---


Compile the component, and build your app. Please, report if this is not case.

Anonymous:
Thanks Jesus.  Commenting the line indicated worked.  Just picked up the message you sent to my  e-mail.  I'll check the CVS as well.

Navigation

[0] Message Index

Go to full version