|
I have n’t used Midas for a long time. Anyway, this is an example.
1. If you are using BDE, you should put a TSession on the remote data module, and Database should not be placed on the remote data module, because this may cause name conflicts.
2. What you said "can be displayed in the dbgrid but what to do if you want to copy it to the database", this problem does not exist, because since the dbgrid display is originally the data in the local data set tclientdataset, whether this data is input locally , Or accept it from the server.
3. For client data transfer, use tclientdataset.ApplyUpdates (-1); the return value is the number of records that were sent unsuccessfully. Note that not the number of records that have been sent. The reason for sending unsuccessful data is not only data errors, but also Duplicate records, for example, if you receive 100 records from the server, if you do not modify the ApplyUpdates, the result is not successful.
4. "How does the software implement automatic dial-up to a server such as a point connection-just start dialing through a cat", I used to call it like this under Win98:
if WinExec (PChar ('RunDll32.exe Rnaui.dll, RnaDial' + DialName), SW_SHOWNORMAL) <= 31 then
ErrorDlg ('Call Dialer' + DialName + 'Failed!');
However, the above code does not work under 2000 and XP, and I did not study it further, because my client operating system at that time was 98, let the experts downstairs say!
5. How to detect if the network is busy? This is hard to say. Generally, a DCOMConnection connection is successful, but if there is a problem in the data transmission intermediate network, I am afraid it is not easy to detect, but the system finally tells you that the connection timed out. |
|