Home > Software engineering >  For help, the great god. Through VB to do a simple LAN server.
For help, the great god. Through VB to do a simple LAN server.

Time:11-03

Company to record some content into the EXCEL spreadsheet every day, each day, I want to through the local area network (LAN) content were recorded every day in my computer such as 1 D plate, TXT, made a small VB program, add a button, a query button, a write to my computer 1. TXT, a read my computer 1. TXT into the listbox control, code is as follows: your computer IP172.16.2.10, your computer access is normal, but on the other computer is washed-up, seek counsel,
Private Sub Command2_Click ()
List1. Visible=True
List1. Clear
Dim s As String
Dim As a String
Dim keyword As String
Dim keyword1 As String
Dim lujing As String
Lujing=\ \ "172.16.2.10 $\ \ D 1. TXT"
Keyword1=Text1. Text
The Open lujing For Input As # 1
While Not EOF (1)
The Line Input # 1, s
If InStr (1 s, keyword1) & gt; 0 Then List1. AddItem List1. ListCount + 1 & amp; "" & amp; S
Wend
Close # 1
End Sub

CodePudding user response:

It is better to do an ASP page directly into the database

CodePudding user response:

There are a lot of socket source, server and client, you are looking for a change:
http://download.csdn.net/detail/geoff08zhang/4571358

CodePudding user response:

Probably you didn't open sharing path

CodePudding user response:

It is obvious that no one else will not be able to access your computer from the network. You must first confirm others inside the run input \ \ 172.16.2.10 $\ \ D 1. TXT can open you of this file.

CodePudding user response:

The default Shared D $for administrator access only,
Just to read a file and open the D $access unsafe,

Feasible solution is:
The server on a Shared directory;
Ordinary users have write access to fill the Excel table, to the Shared directory write a username to distinguish the TXT file;
Execute exe collect users have read permission, can read other users' TXT file;
If data confidentiality requirements is not high, the Shared directories directly read access to everyone, simplify management,

CodePudding user response:

Don't with Shared directory on your computer to write a small program, open a UDP port, the client directly to the port to send data, have you received the data in the disk again

CodePudding user response:

That it is better to install IIS, colleagues and write a simple ASP page to fill in and submit.
  • Related