Migrating from FireDAC: SQL Server
Posted: Tue 11 Dec 2018 00:24
Hello,
I have an application in XE7, and I use FireDAC to access a database in SQL Server.
I need to find the equivalent configurations of UniDAC, I am interested in its component, but first I want to evaluate it to know the advantages, as well as the possible disadvantages:
TFDConnection:
FDConnection1.FetchOptions.DetailOptimize:= False;
FDConnection1.FetchOptions.LiveWindowFastFirst:= True;
FDConnection1.FetchOptions.LiveWindowParanoic:= True;
FDConnection1.FormatOptions.StrsEmpty2Null:= False;
FDConnection1.ResourceOptions.AutoConnect:= False;
FDConnection1.ResourceOptions.AutoReconnect:= True;
FDConnection1.ResourceOptions.DirectExecute:= True;
FDConnection1.ResourceOptions.SilentMode:= True;
FDConnection1.UpdateOptions.LockMode:= lmPessimistic;
FDConnection1.UpdateOptions.LockPoint:= lpImmediate;
FDConnection1.TxOptions.DisconnectAction:= xdRollback;
FDConnection1.FormatOptions.SortLocale:= 0;
FDConnection1.FormatOptions.MapRules.Add(dtDateTimeStamp, dtDateTime);
TFDTable:
Inherits the entire configuration of the TFDConnection.
TFDQuery:
FDQuery1.FetchOptions.Mode:= fmAll;
FDQuery1.CachedUpdates:= True;
FDQuery1.UpdateOptions.LockMode:= lmNone;
FDQuery1.FetchOptions.AutoClose:= False;
FDQuery1.ResourceOptions.ParamCreate:= False;
The TFDTable I use it to modify (INSERT, UPDATE and DELETE) and navigate the tables of the database, and the TFDQuery for the execution of queries (SELECT, INSERT, UPDATE and DELETE).
So far I found something curious in the TUniQuery, is that if I execute a SELECT that returns 100,000 rows, and I realize a KILL from SQL Server, the TUniQuery, does not return with error, if not that the Open ends with the records that reached to obtain and continue the code flow, which in FireDAC, and for the logic of my application is to return an error, indicating that the connection was closed.
Thanks in advance.
I have an application in XE7, and I use FireDAC to access a database in SQL Server.
I need to find the equivalent configurations of UniDAC, I am interested in its component, but first I want to evaluate it to know the advantages, as well as the possible disadvantages:
TFDConnection:
FDConnection1.FetchOptions.DetailOptimize:= False;
FDConnection1.FetchOptions.LiveWindowFastFirst:= True;
FDConnection1.FetchOptions.LiveWindowParanoic:= True;
FDConnection1.FormatOptions.StrsEmpty2Null:= False;
FDConnection1.ResourceOptions.AutoConnect:= False;
FDConnection1.ResourceOptions.AutoReconnect:= True;
FDConnection1.ResourceOptions.DirectExecute:= True;
FDConnection1.ResourceOptions.SilentMode:= True;
FDConnection1.UpdateOptions.LockMode:= lmPessimistic;
FDConnection1.UpdateOptions.LockPoint:= lpImmediate;
FDConnection1.TxOptions.DisconnectAction:= xdRollback;
FDConnection1.FormatOptions.SortLocale:= 0;
FDConnection1.FormatOptions.MapRules.Add(dtDateTimeStamp, dtDateTime);
TFDTable:
Inherits the entire configuration of the TFDConnection.
TFDQuery:
FDQuery1.FetchOptions.Mode:= fmAll;
FDQuery1.CachedUpdates:= True;
FDQuery1.UpdateOptions.LockMode:= lmNone;
FDQuery1.FetchOptions.AutoClose:= False;
FDQuery1.ResourceOptions.ParamCreate:= False;
The TFDTable I use it to modify (INSERT, UPDATE and DELETE) and navigate the tables of the database, and the TFDQuery for the execution of queries (SELECT, INSERT, UPDATE and DELETE).
So far I found something curious in the TUniQuery, is that if I execute a SELECT that returns 100,000 rows, and I realize a KILL from SQL Server, the TUniQuery, does not return with error, if not that the Open ends with the records that reached to obtain and continue the code flow, which in FireDAC, and for the logic of my application is to return an error, indicating that the connection was closed.
Thanks in advance.