Subject | RE: [IBO] Digest Number 1781 |
---|---|
Author | jwharton@ibobjects.com |
Post date | 2004-03-27T18:26:43Z |
I'm not able to follow this code especially well.
It strikes me as being way too client-side.
Much of what you are doing could probably be put on the server.
You don't need to get a newer version of Delphi but it is usually a good idea to move to the latest version of IBO if you
are in active development.
Jason Wharton
www.ibobjects.com
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
We are using delphi 5 with IBObject 4 and having the following problems with
an IBOTable component.
move the cursor to another record or to disable a data aware control.
Is it a known bug? Will it help if we upgrade delphi to 7 and IBObjects to
the latest version?
Following is relevant code:
----------------------------------
This one works
//<<<@@@69 Ning
dbed_VTitle.enabled := False;
//>>>@@@69
if (dm.tblVClient.State = dsEdit) or (dm.tblVClient.State = dsInsert)
then
begin
dm.tblVClient.Post;
dm.dbLandpak.SavePoint;
dm.tblVClient.Refresh;
end;
btn_EditVendor.ImageIndex := 0;
dbed_VSurname.enabled := False;
dbed_VGNames.enabled := False;
//<<<@@@69 Ning
//*
// Display "Dataset not in edit/insert mode" without apparent reason!
//
//dbed_VTitle.enabled := False;
//>>>@@@69
this one does not
if (dm.tblVClient.State = dsEdit) or (dm.tblVClient.State = dsInsert)
then
begin
dm.tblVClient.Post;
dm.dbLandpak.SavePoint;
dm.tblVClient.Refresh;
end;
btn_EditVendor.ImageIndex := 0;
dbed_VSurname.enabled := False;
dbed_VGNames.enabled := False;
dbed_VTitle.enabled := False;
another one
if dm.tblFile.active then
begin
//*
// dm.tblFile.locate returns an error saying dataset not in edit mode
when
// moving cursor to a different record. Even set the dataset to edit
mode,
// the error does not go away.
// I think this is a bug in the component!!!
//*
lFiltered := dm.tblFile.filtered;
try
dm.tblFile.filtered := false;
if dm.tblFile.locate('Filenumber', vararrayof([PayeeFile]), []) then
if PayeeType = 'V' then result :=
dm.tblFile.fieldbyname('MAINVLASTNAME').asstring else
result := dm.tblFile.fieldbyname('MAINPLASTNAME').asstring
else result := '';
finally
dm.tblFile.filtered := lFiltered;
end;
end else
--------------------------------
thanks,
Matthew
----------
WARNING- This e-mail including any attachments, is for the
personal use of the recipient(s) only. Republication and
re-dissemination, including posting to newsgroups or web
pages, is strictly prohibited without the express
prior consent of Thomson legal & Regulatory Limited
ABN 64 058 914 668
It strikes me as being way too client-side.
Much of what you are doing could probably be put on the server.
You don't need to get a newer version of Delphi but it is usually a good idea to move to the latest version of IBO if you
are in active development.
Jason Wharton
www.ibobjects.com
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
We are using delphi 5 with IBObject 4 and having the following problems with
an IBOTable component.
>From time to time: "Dataset not in Edit or Insert mode" when the dataset isalready in browse mode (posted a few lines before) and the code tries to
move the cursor to another record or to disable a data aware control.
Is it a known bug? Will it help if we upgrade delphi to 7 and IBObjects to
the latest version?
Following is relevant code:
----------------------------------
This one works
//<<<@@@69 Ning
dbed_VTitle.enabled := False;
//>>>@@@69
if (dm.tblVClient.State = dsEdit) or (dm.tblVClient.State = dsInsert)
then
begin
dm.tblVClient.Post;
dm.dbLandpak.SavePoint;
dm.tblVClient.Refresh;
end;
btn_EditVendor.ImageIndex := 0;
dbed_VSurname.enabled := False;
dbed_VGNames.enabled := False;
//<<<@@@69 Ning
//*
// Display "Dataset not in edit/insert mode" without apparent reason!
//
//dbed_VTitle.enabled := False;
//>>>@@@69
this one does not
if (dm.tblVClient.State = dsEdit) or (dm.tblVClient.State = dsInsert)
then
begin
dm.tblVClient.Post;
dm.dbLandpak.SavePoint;
dm.tblVClient.Refresh;
end;
btn_EditVendor.ImageIndex := 0;
dbed_VSurname.enabled := False;
dbed_VGNames.enabled := False;
dbed_VTitle.enabled := False;
another one
if dm.tblFile.active then
begin
//*
// dm.tblFile.locate returns an error saying dataset not in edit mode
when
// moving cursor to a different record. Even set the dataset to edit
mode,
// the error does not go away.
// I think this is a bug in the component!!!
//*
lFiltered := dm.tblFile.filtered;
try
dm.tblFile.filtered := false;
if dm.tblFile.locate('Filenumber', vararrayof([PayeeFile]), []) then
if PayeeType = 'V' then result :=
dm.tblFile.fieldbyname('MAINVLASTNAME').asstring else
result := dm.tblFile.fieldbyname('MAINPLASTNAME').asstring
else result := '';
finally
dm.tblFile.filtered := lFiltered;
end;
end else
--------------------------------
thanks,
Matthew
----------
WARNING- This e-mail including any attachments, is for the
personal use of the recipient(s) only. Republication and
re-dissemination, including posting to newsgroups or web
pages, is strictly prohibited without the express
prior consent of Thomson legal & Regulatory Limited
ABN 64 058 914 668