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:
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.