Page 1 of 1

Problems using filters

Posted: Fri 14 Dec 2007 22:33
by bernr
I keep getting an error if I do an insert to a table that had filters.
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
If in the Insert I try to fill in a value for the last field in a Table then I get an error like
---------------------------
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
---------------------------
Now if I don't do the

Code: Select all

Table.Filter:=' some filter';
Table.Filtered:=true;
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

Posted: Mon 17 Dec 2007 13:08
by Antaeus
I could not reproduce the problem.
Please send me a complete small sample at sdac*crlab*com to demonstrate it, including script to create and fill table.

Also supply me the following information:
- exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- exact version of your IDE;
- exact version of SQL server and client. You can see it in the Info sheet of TMSConnection Editor.