Home > Back-end >  Novice asked: C builder to LAN database problems
Novice asked: C builder to LAN database problems

Time:10-13

I novice, want to make up a small software, there is a server program, a client, the server to store database data, the communication between them and ServerSocket ClientSocket, but found that the means of communication seems only ServerSocket - & gt; The Socket - & gt; SendText (), for example, I landed in the client, the user name and password through the ClientSocket - & gt; The Socket - & gt; SendText () to the server, the server in your own database query identified users, and return the information, the client login successful,

The problem:
1. How to do authentication, that is, if you have a lot of users log in to the server, at the same time to query information from the server, the server is how to identify what stage the client by the query? How can do it only for the client back to the information?

2, if the software function is relatively complex, need to transfer a lot of information is very miscellaneous, only SendText () seemed very complex is very complicated, how can you simplify? Is there a better way?

CodePudding user response:

If it is a local area network software can not use three layers, but with the database directly connected

CodePudding user response:

Unidac

Direct connection.

CodePudding user response:

Unidac want money, how to break the

CodePudding user response:

Many remote calls RPC, method, webservice is one way to do that, but the link database or you yourself, generally with Oracle accounted, mysql to use MySQL++, used to use ado, PostgreSQL USES libpqxx,

CodePudding user response:

With the used and ado, seems to be good

CodePudding user response:

Less a self development among three layers will naturally good, otherwise is: database - & gt; ADO - & gt; Middle server - & gt; Network - & gt; Your C/S application, problems with their development in the middle of the server database and ADO with far less famous brand companies

CodePudding user response:

Choose TCP, the c-terminal login success will no longer be disconnected until the task is complete, each has a socket connection is successful, is from the socket to identify each C S end,
  • Related