3.FireDAC Component Snapshot

Source: Internet
Author: User

Tfdmanager Connection definition and connect connection management
Tfdconnection

Database connection components, support three ways to connect: 1. Persistent definition (with a unique name and a configuration file that can be managed by Fdmanager)

Cases:

Uses
FireDAC.  Comp.  Client, FireDAC.  Stan.  Intf;         
Var
Odef: Ifdstanconnectiondef;
Begin
:= Fdmanager.  Connectiondefs.  Addconnectiondef;     
Odef.:' mssql_connection ';   
Odef.:' MSSQL ';   
Odef.:' 127.0.0.1 ';   
Odef.:' Northwind ';   
Odef.:True;   
Odef.  Markpersistent;  
Odef.  Apply;  
.....................
FDConnection1.:' mssql_connection ';   
FDConnection1.:True;   
End


2. Private definition (there is a unique name that can be managed by Fdmanager, no configuration file)

Cases:

Var
Oparams: TStrings; 
Begin
:= tstringlist.  Create;   
Oparams.  Add(' server=127.0.0.1 ');     
Oparams.  Add(' database=northwind ');     
Oparams.  Add(' Osauthent=yes ');     
Fdmanager.  Addconnectiondef(' mssql_connection 'MSSQL ', oparams);       
.....................
FDConnection1.:' mssql_connection ';   
FDConnection1.:True;   
End

3. Temporary definition (no Name and configuration file, cannot be managed by Fdmanager, the runtime writes parameters to the params property)

Cases:

Uses
FireDAC.Phys.IBDef, FireDAC.Phys.IBWrapper;
......
Fdconnection1.drivername: = ' IB ';
With Fdconnection1.params as Tfdphysibconnectiondefparams do begin
Protocol: = Iptcpip;
Server: = ' 127.0.0.1 ';
Database: = ' c:\IB\employee.gdb ';
UserName: = ' sysdba ';
Password: = ' masterkey ';
End
fdconnection1.connected: = True;
2. Fdconnection1.connectionstring: = ' driverid=mssql; Server=127.0.0.1;database=northwind; User_name=sa ';

fdconnection1.connected: = True;)

End

Tfdtransaction Database Transaction Management
Tadcommand Executes the SQL statement. Do not return results
Tfdtableadapter Provides communication between the application and the data
Tfdschemaadapter

Centrally cache updates. A very important and practical component. Set the Cachedupdates property to true before setting the data set.

Tfdmemtable FIREDAC's own memory table, three layers of essential components, is also very important, can completely replace Clientdataset
Fdquery Adoquery-like components, direct SQL statements and store returned results
Tfdstoredproc Executing Server stored Procedures
Tfdtable Similar to adotable, database table data set

.................... Cond

3.FireDAC Component Snapshot

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.