Recent

Author Topic: UIB - Inactive Dataset  (Read 6607 times)

talorigomat

  • Jr. Member
  • **
  • Posts: 96
UIB - Inactive Dataset
« on: November 02, 2004, 11:10:21 am »
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;
Lazarus 1.8.0Rc4, Windows 10

jesusr

  • Sr. Member
  • ****
  • Posts: 470
Re: UIB - Inactive Dataset
« Reply #1 on: November 03, 2004, 06:38:48 am »
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;


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: [Select]

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


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

Anonymous

  • Guest
UIB - Inactive Dataset
« Reply #2 on: November 03, 2004, 09:36:26 am »
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.

 

TinyPortal © 2005-2018