Solved

transfer data between 2 computers Using direct cable

Posted on 2000-02-16
4
200 Views
Last Modified: 2010-05-02
Can I transfer the data between 2 computers use direct cable connect by VB and how ?

Can you give me a sample with it ?

Thank you very much.
0
Comment
Question by:qkhoi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 3

Expert Comment

by:3rsrichard
ID: 2529098
Sure you can.
Here's how you would send the string TXBUFF$

  Form1.MSComm1.CommPort = 1
  Form1.MSComm1.Settings = "1200,N,8,1"
  Form1.MSComm1.PortOpen = True
  Form1.MSComm1.InputLen = 0
  Form1.MSComm1.Output = TXBUFF$

Heres how you could receive
  RXBUFF$ = ""
  Form1.MSComm1.CommPort = 1
  Form1.MSComm1.Settings = "1200,N,8,1"
  Form1.MSComm1.PortOpen = True
  Form1.MSComm1.InputLen =

  ComDelay = 0
  Do
    DoEvents
    RXBUFF$ = RXBUFF$ & Form1.MSComm1.Input
  Loop Until (ComDelay > 2)

Where ComDelay is hooked to a timer so that the program wont get hung up.
0
 
LVL 6

Expert Comment

by:VBGuru
ID: 2530049
Yes, MSCOMM control can be used if you have modem cabel connected to the serial port of the computers. This is exactly what 3rsrichard  is trying to explain. In the above example connect the cable between 2 com1 serial port.
>>>Can I transfer the data between 2 computers use direct cable connect by VB and how ?
0
 
LVL 3

Expert Comment

by:3rsrichard
ID: 2531216
If you use a cable only, then you have to have something to swap the wires on pins 2 and 3.  A "Null Modem" or other device you can get at a parts store.
0
 
LVL 3

Accepted Solution

by:
3rsrichard earned 100 total points
ID: 2532319
gkhoi
  You should provide some response.
Sure you can.
Here's how you would send the string TXBUFF$

  Form1.MSComm1.CommPort = 1
  Form1.MSComm1.Settings = "1200,N,8,1"
  Form1.MSComm1.PortOpen = True
  Form1.MSComm1.InputLen = 0
  Form1.MSComm1.Output = TXBUFF$

Heres how you could receive
  RXBUFF$ = "" 
  Form1.MSComm1.CommPort = 1
  Form1.MSComm1.Settings = "1200,N,8,1"
  Form1.MSComm1.PortOpen = True
  Form1.MSComm1.InputLen =

  ComDelay = 0
  Do
    DoEvents
    RXBUFF$ = RXBUFF$ & Form1.MSComm1.Input
  Loop Until (ComDelay > 2)

Where ComDelay is hooked to a timer so that the program wont get hung up.
If you use a cable only, then you have to have something to swap the wires on pins 2 and 3.  A "Null Modem" or other device you can get at a parts store.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month6 days, 17 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question