Couple of Qs

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

Couple of Qs

Post by FredS » Tue 22 Sep 2015 20:26

Is there anything more detailed that explains SmartFetch other than:
Smart fetch options are used to set up the behavior of the SmartFetch mode :(

Is there anything for the Interbase Provider uniTable that fetches Server side IDs like QueryIdentity for SQL Server? I know a Insert SQL can use Returning..

Thanks

Fred

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

Re: Couple of Qs

Post by ViktorV » Wed 23 Sep 2015 09:52

1. The SmartFetch mode allows to speed up navigation through the DataSet with a big amount of data. To enable this mode, it is enough to set the Enabled property to True. In this case, when opening the DataSet, only key field values will be read out, our the values of the fields specified in the PrefetchedFields property. Data of other fields will be read out on demand when accessing a record.
2. To return the value of an auto-incremental field generated on the server-side, you should set the TUniTable.DMLRefresh property to True. See more details about this property in the UniDAC help: https://www.devart.com/unidac/docs/?dev ... efresh.htm

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

Re: Couple of Qs

Post by FredS » Wed 23 Sep 2015 17:47

That helps a lot, thanks.

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

Re: Couple of Qs

Post by FredS » Wed 23 Sep 2015 18:41

ViktorV wrote:..you should set the TUniTable.DMLRefresh property to True. See more details about this property in the UniDAC help: https://www.devart.com/unidac/docs/?dev ... efresh.htm
Having some issues with DMLRefresh, it worked at first but now returns garbage.
Then I thought I'd strip it out of the DB Monitor log but the Monitor log is wrong, here is the entry from that log:

Code: Select all

2015-09-23 11:21:05 AM 0.000 SQL Execute: INSERT INTO FETCHLOG
  (DOMAINID, MESSAGE, ALERTLEVEL, SERVER, EVENTTIME)
VALUES
  (?, ?, ?, ?, ?)
RETURNING 
  ID, DOMAINID, MESSAGE, ALERTLEVEL, SERVER, EVENTTIME

:DOMAINID(LargeInt,IN)=3 
:MESSAGE(WideString[26],IN)='Processing Server: VMHOME ' 
:ALERTLEVEL(Integer,IN)=0 
:SERVER(WideString[6],IN)='VMHOME' 
:EVENTTIME(DateTime,IN)=2015-09-23 11:21:05 AM 
:RET_ID(LargeInt,OUT)=<NULL> 
:RET_DOMAINID(LargeInt,OUT)=<NULL> 
:RET_MESSAGE(WideString[0],OUT)=<NULL> 
:RET_ALERTLEVEL(Integer,OUT)=<NULL> 
:RET_SERVER(WideString[0],OUT)=<NULL> 
:RET_EVENTTIME(DateTime,OUT)=<NULL> Complete
  2015-09-23 11:21:05 AM 0.000 CommitRetaining:  Complete
But the GUI shows this:
Image

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

Re: Couple of Qs

Post by ViktorV » Thu 24 Sep 2015 09:09

Thank you for the information. We have reproduced the problem. We are investigating this behavior of UniDAC, and we will inform you about the results.

Post Reply