| |

VerySource

 Forgot password?
 Register
Search
View: 2510|Reply: 11

About Midas three-tier database! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !!!!!!!!!!! !! !! !!

[Copy link]

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-4 09:00:01
| Show all posts |Read mode
I made a simple Midas application based on the textbook to realize remote automatic copy (insertion) of data through dial-up network.
(1) Establish remote data module on the server side
      Add the database1 datasetprovider query1 control to it
(2) Join tclientdataset tdatasourse tdcomconnection tdbgrid on the client
      Controls
The function that can be realized now is that as long as the client program is run, the server automatically runs and reflects the contents of the server-side query1 query in the client tclientdataset and can be displayed in tdbgrid. The transfer of data is basically complete, but there are still many things that I do not understand.
Specific issues:
    (1) The data can be displayed in dbgrid, but what should be done if it is copied into the database?
    (2) What if the client sends data to the server? The specific point is to achieve this point of sending at the client and then the server can automatically receive or click a button to achieve the transfer function, which means that the transfer of data can be intervened manually
    (3) How does the software implement automatic dial-up to the server such as point connection-just start dialing through cat
    (4) How to detect if the network is busy?



I hope that your elder brother and elder sister will be grateful for your guidance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!
Reply

Use magic Report

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-4 11:00:01
| Show all posts
Brothers
Reply

Use magic Report

0

Threads

15

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-4 14:06:01
| Show all posts
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.
Reply

Use magic Report

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-4 14:27:01
| Show all posts
If the server is transmitting data to the workstation, is it necessary to add tclientdataset, etc. (Note: on the server?)
Reply

Use magic Report

0

Threads

15

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-4 14:48:01
| Show all posts
Generally, the client actively requests data from the application server. As long as the setting of TClientDataSet is correct, Open or Active: = True is fine.
Reply

Use magic Report

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-4 14:54:01
| Show all posts
I still don't quite understand that the content of the server query can be copied to the workstation through the tclientdataset on the client, but if the query of the workstation is to be transmitted to the server, is it necessary to join the tclientdataset on the server to obtain the workstation data?
Reply

Use magic Report

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-4 15:51:01
| Show all posts
What I said above also reminded me that for example, I can click <send> tclientdataset active: = true on the workstation, but how can I manually select <receive> / <cancel> on the server?
Reply

Use magic Report

0

Threads

15

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-4 17:09:01
| Show all posts
But how to manually select <receive> / <cancel> on the server?
======================================================== ===============================
I have already said above. Generally, the client actively receives and sends. If there is manual intervention on the server side, you can write a login request process through the type library of the remote data module. The client confirms the login before sending or receiving data. Client, you can customize the process through DCOMConnection.GetServer .; call the server-side login process in this form
Reply

Use magic Report

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-26 11:45:02
| Show all posts
Top
Reply

Use magic Report

1

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-26 16:00:01
| Show all posts
How does the workstation write data to the server: Generally speaking, DCOM publishes data to the workstation through the server, but how to implement data returned from the workstation to the server database through Tdatasetclient?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list