1. Multi-data-set reading
A. Take a number of SQL configurations, borrow tstringlist to store multiple different fetch SQL
B.DBA fetch: DBA. Readmultipledataset (Tstringlist)
C. Extracting the result set from the DBA. Getresultdataset (sequence, Fcds); The sequence bit starts from 0 and corresponds to the SQL sequence of the tstringlist;
D. Cleanup of result sets: DBA. Clearresultdatasets;
2. Multiple Data Set submissions
A. Invalid message cleanup before submission: DBA. Clearwritedatasets
B. Add a dataset that needs to be committed: DBA. Addwritedataset (table name, clearing SQL, CDs to be submitted);
C. Write Library: DBA. Writemultipledatasets;
-----------------------------------------------------------------------
Tested: did not find any place to identify key field values when most data sets were submitted?
Question: Is it in the process of submitting, by Table name table structure, and then to identify the keyword?
So if the data table does not identify the keyword, but the user identifies a field as a keyword, how do you do it?
Processing of 3.Blob field data
A. For the contents of the Blob field, such as slices, files, and so on, first to the memory stream before the parameter processing
Fimgstream:=tmemorystream.create;
Fimgstream.loadfromfile (XXX); Or some other way of memory loading
B. Borrowing DBA for SQL processing
Dba. Paramparcel.clear;
Dba. Paramparcel.putstreamgoods (': XX ', Stream); Parameter configuration, preceded by a colon, followed by a formal parameter
Shape participation field names have no actual relationship, can be consistent, can also be inconsistent
Dba. ExecuteSQL (SQL statement, whether there is a return value, whether the transaction is transacted, returns the receive variable);
* * In SQL statements, the configured parameters should be consistent with the parameters in the parcel
C. Fetching BLOB field information from the DBA
Fimgstream:=tmemorystream.create;
Tblobfield (Cds.fieldbyname (' xx ')). Savetostream (Fimgstream); After the content is stored in the memory stream, the rest of the matter is what to do with it.
4. Long time service plug-in callback business
A. Service plug-in side:
A. Creating an Interface object: Messager:=tapimessager.create (Inparcel);
B. Extracting callback object source information from ingress parameters ==> requires client mates to pass in
Targetnodeid:=inparcel.getansistringgoods (' Thisnodeid ');
Connectionid:=inparcel.getint64goods (' Fromconnectionid ');
C. Actual business processing (if there are client-related parameters in the business, extract directly from the incoming parameter object)
D. Callback results returned
I: Create return parameter, same as regular plug-in, return with Qbparcel
II: Send callback Message Using interface object
Messager.callbacktoconnection (Targetnodeid,connectionid, return parameter);
III: The release qbparcel.free of the returned parameters;
The release Freeandnil (messager) of the interface object;
B. Client-side business processing
A. Parameter configuration: Configure incoming parameters according to actual business needs
B. Call long time service with TDLLPLUGIN.ASYNCRPC (plug-in name, plug-in Access password, incoming parameters)
C. After submission, the business process is completed. As for how long, processing is completed and returned after processing, the message object will be processed;
----------
D. After the server returns a long time-consuming business, the content of the callback will be received by Tmsgreceiver
* * Receive processing event: Oncallbackmessage (msgparcel:tqbparcel;dllfilename:string);
* * Parameters are returned by the server plug-in parameters and service plug-in file name
5. Localized business plug-in processing
A: The call of the client business plug-in, mainly using Tqbclientmodule to make the call;
B: Parameter transfer tqbclientmodule.inputparcel for processing, the processing method is consistent with the qbparcel under normal circumstances
C: Localized plug-in invocation: Tqbclientmodule.executetask (' Business plug-in file name '. dll ');
D: Extraction and processing of returned results: using Tqbclientmodule.outputparcel;
QB Data Learning. 01