Problems using filters
Posted: Fri 14 Dec 2007 22:33
I keep getting an error if I do an insert to a table that had filters.
If I do some thing like
If in the Insert I try to fill in a value for the last field in a Table then I get an error like
then the in insert works fine.
Or if I close and reopen the table before the insert then it works.
Or if I do use the filter and don't access the last field of the table then it works.
Any Suggestions?
Using Delphi in Rad Studio 2007
SDAC 4.30.0.13
Bern
If I do some thing like
Code: Select all
Table.Open;
Table.Filter:=' some filter';
Table.Filtered:=true;
...some code...
Table.Filtered:=false;
Table.Insert;
Table.Fieldbyname('').asstring:=somevalue;
Table.Fieldbyname('').asstring:=somevalue;
Table.Fieldbyname('').asstring:=somevalue;
Table.Fieldbyname('').asstring:=somevalue;
Table.Post.
Table.Close
Now if I don't do the---------------------------
Debugger Exception Notification
---------------------------
Project test.exe raised exception class EMSError with message 'Column name 'test' appears more than once in the result column list.
Column name 'test' appears more than once in the result column list.
Column name 'test' appears more than once in the result column list.
Column name 'test' appears more than once in the result column list.'.
---------------------------
Break Continue Help
---------------------------
Code: Select all
Table.Filter:=' some filter';
Table.Filtered:=true;
Or if I close and reopen the table before the insert then it works.
Or if I do use the filter and don't access the last field of the table then it works.
Any Suggestions?
Using Delphi in Rad Studio 2007
SDAC 4.30.0.13
Bern