FilterSQL Refresh Error

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

FilterSQL Refresh Error

Post by FredS » Mon 09 Feb 2015 21:54

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

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: FilterSQL Refresh Error

Post by FredS » Mon 09 Feb 2015 22:50

Same issue with SQLServer with a new Error:
"Record was changed by another user."

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: FilterSQL Refresh Error

Post by ViktorV » Tue 10 Feb 2015 12:27

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.

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: FilterSQL Refresh Error

Post by FredS » Tue 10 Feb 2015 20:35

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:

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: FilterSQL Refresh Error

Post by ViktorV » Wed 11 Feb 2015 08:41

Glad to see that the issue was resolved. Feel free to contact us if you have any further questions about UniDAC.

Post Reply