Tidtcpdbconnection is used to build a connection with the idtcpdbserver server.
Attribute: (use the default value if not listed during design)
String server refers to the idtcpdbserver address, which can be a domain name, address explanation name, IP address, etc.
Word port refers to the Service port of idtcpdbserver.
String socketword socket, consistent with socketword of idtcpdbserver.
Word maxblocksize refers to the block bytes (Kb) during data transmission. When the block bytes are too large, the client response speed is affected, but the network session is reduced. On the contrary, the client response speed is improved, but the network session is increased.
Event:
Password Encryption is recommended for tencryptpasswordproc onencryptpassword. Encrypt the client password and send it to the server. The parameter is:
String & atext address string. The input is the original password, that is, tidtcpdbconnection-> password. The output value is the string submitted to the server.
_ Int64 unique seed for each connection of the aident server.
See the onloginverify event of [2. tidtcpdbserver.
Method:
Bool _ fastcall sendcommand (System: unicodestring acmd, classes: tstrings * astrings = (classes: tstrings *) (0x0 ));
Send commands to the server,
Bool _ fastcall againcommand (System: unicodestring acmd );
Send a single-line command to the server.
Int _ fastcall receiverevert (treverttype areverttype, tgetstringfunc fcallback = 0x0 );
The server response receiver.
Int _ fastcall begintrans (void); start a transaction
Bool _ fastcall committrans (void); Submit the current transaction
Bool _ fastcall rollbacktrans (void); roll back the current transaction
Public attributes (runtime)
String lastrevert last received command
String lastinform last received information
String dbproduct indicates the database to which the server is connected.
The following tidtcpdbquery is used to describe how to use it.