Append method have a problem.
In case
ZTable1.Append;
ZTable1.FieldByName('field').AsString := '2a';
Ztable1.Post;
and then EDatabaseError
------------
ZTable1.Insert;
ZTable1.FieldByName('field').AsString := '2a';
Ztable1.Post;
In this case, no problem.
ZQuery have a same proble, too.
Regards
Kogata
ZTable(or ZQuery) error
Moderators: gto, cipto_kh, EgonHugeist
Hi
This is my enviroment.
OS:WindowsXPSP2
Compiler:Delphi7
Database:SQL Server(MSDE)
ZeosLib:6.6.1beta
When I use ADOconnection & ADODataSet, no problem.
However when I use Zconnection & Ztable, problem occur.
In this case, no problem.
ADODataSet1.Append;
ADODataSet1.FieldByName('field').AsString := '3a';
ADODataSet1.Post;
Regards.
This is my enviroment.
OS:WindowsXPSP2
Compiler:Delphi7
Database:SQL Server(MSDE)
ZeosLib:6.6.1beta
When I use ADOconnection & ADODataSet, no problem.
However when I use Zconnection & Ztable, problem occur.
In this case, no problem.
ADODataSet1.Append;
ADODataSet1.FieldByName('field').AsString := '3a';
ADODataSet1.Post;
Regards.
Hi Mark,
Exception:EDatabaseError
'ZTable1:dataset isn't edit mode or insert mode.'
Regrds
Kogata
Exception:EDatabaseError
'ZTable1:dataset isn't edit mode or insert mode.'
Code: Select all
-------- ZAbstractRODataset.pas ------
procedure TZAbstractRODataset.SetFieldData(Field: TField; Buffer: Pointer);
var
ColumnIndex: Integer;
RowBuffer: PZRowBuffer;
WasNull: Boolean;
begin
if not Active then
raise EZDatabaseError.Create(SOperationIsNotAllowed4);
if not RequestLive and (Field.FieldKind = fkData) then
RaiseReadOnlyError;
if not (State in dsWriteModes) then
DatabaseError(SNotEditing, Self); [B]<--- Exception occur[/B]
if GetActiveBuffer(RowBuffer) then
Kogata
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
OK...
This may be a bug. Please make a small project with a 'connect','Append' and 'insert' button. Also include the 'create table' statement necessary to build the sample table. As the error is in the component layer the problem is probably database independent.
Don't forget to post the sample in the bug tracker at http://zeosbugs.firmos.at/ , so we won't forget about your question when it sinks down the forum.
Mark
This may be a bug. Please make a small project with a 'connect','Append' and 'insert' button. Also include the 'create table' statement necessary to build the sample table. As the error is in the component layer the problem is probably database independent.
Don't forget to post the sample in the bug tracker at http://zeosbugs.firmos.at/ , so we won't forget about your question when it sinks down the forum.
Mark
Hi Mark,
I am sorry.
When I maked a simple probject, I found a problem in my code.
I used TMS Grid component in old project.
It was problem.
New simple project was no prblem.
ZeosLib and TMS Grid componet is incompatible.
ADO and TMS Grid Component is compatible.
So I give up using ZeosLib.
Regards,
Kogata
I am sorry.
When I maked a simple probject, I found a problem in my code.
I used TMS Grid component in old project.
It was problem.
New simple project was no prblem.
ZeosLib and TMS Grid componet is incompatible.
ADO and TMS Grid Component is compatible.
So I give up using ZeosLib.
Regards,
Kogata