This is the idea I started to contact programming. If I use only the database, I don't use Sock to implement a simple chat room in the LAN, I think many people have had many people. This program itself has no value, just sharing his original design with everyone, two is in view of the introduction of the use of Ado controls online, it is not a lot of jade.
The words retired are correct, first build a database chat with Access, then build two tables:
Content (Name), Time (Time), Content (Text))
Online (Name))
Design: Login Module:
Select the server, that is, the online shared database; enter the username;
Refresh module: Responsible to refresh the online user, chat content (with a timer). Application Module: The sending of the user's chat content, and the prompt and related work when exiting. The operation is as follows, details can view the source code, which has a detailed comment. Figure 1 Select the online shared database: Figure 2 Figure 3 Figure 4 Using the number of rows of data sets for the database table to judge whether there is a new record, if there is, play similar QQ prompt. What is needed is that the program is in Stadfx.h or has to join the ADO:
#import "C: / Program Files / Common Files / System / ADO / MSADO15.DLL" No_Namespace Rename /
("EOF", "AdoEOf");
It is mainly to process the data of ADO. Since the current VC6.0 only supports the low version of Access, the MDB file shared on the network is first requested to be a low version, and the corresponding permissions are set, so that normal access to the database can be implemented. Time rush, no meticulous debugging, there are many mistakes, please forgive. The program was debugged under XP VC6.0.