Page 1 of 1

FilterSQL Refresh Error

Posted: Mon 09 Feb 2015 21:54
by FredS
This happens on a Firebird 2.5.3 embedded db.

The field ID values are server side generated.
Record(s) are inserted, then the TuniTable is refreshed.
Data is load into lists and the Server inserted ID is visible in a Grid.

Code: Select all

ds.FilterSQL := FilterCondition;
ds.located finds the record
ds.Edit then ds.Post
and I get a UniDac error: "Refresh failed. Found 0 records."

Same code but adding ds.FilterSQL := EmptyStr works fine, btw the filter condition being cleared is identical to the filter condition it is being replaced with.
Also the call ds.refresh is made while this FilterSQL is applied.

This works:

Code: Select all

ds.FilterSQL := EmptyStr 
ds.FilterSQL := FilterCondition;
ds.located finds the record
ds.Edit then ds.Post

Re: FilterSQL Refresh Error

Posted: Mon 09 Feb 2015 22:50
by FredS
Same issue with SQLServer with a new Error:
"Record was changed by another user."

Re: FilterSQL Refresh Error

Posted: Tue 10 Feb 2015 12:27
by ViktorV
Unfortunately, we could not reproduce the issue with Firebird. Please send a small sample to demonstrate the issue to viktorv*devart*com, including a script to create and fill in the test database object.

Re: FilterSQL Refresh Error

Posted: Tue 10 Feb 2015 20:35
by FredS
Sorry, turns out this was my fault, didn't refresh the ds after a SQL statement ran elsewhere.

Make note: Always try and make a simple example before posting :roll:

Re: FilterSQL Refresh Error

Posted: Wed 11 Feb 2015 08:41
by ViktorV
Glad to see that the issue was resolved. Feel free to contact us if you have any further questions about UniDAC.