473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem receiving data in vb6 using MSComm

Hi. im a newbie in vb6 i need to receive data using mscomm in vb 6...
here is my code but it doesnt work,
please help me...
thanks in advance GODBLESS

---------------------------
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3.     On Error Resume Next
  4.  
  5.     ' Fire Rx Event Every Two Bytes
  6.     MSComm1.RThreshold = 2
  7.  
  8.     ' When Inputting Data, Input 2 Bytes at a time
  9.       MSComm1.InputLen = 2
  10.  
  11.     ' 9600 Baud, No Parity, 8 Data Bits, 1 Stop Bit
  12.     MSComm1.Settings = "9600,n,8,1"
  13.  
  14.     ' Make sure DTR line is low to prevent Stamp reset
  15.     MSComm1.DTREnable = False
  16.  
  17.     ' Open COM21
  18.     MSComm1.CommPort = 21
  19.     MSComm1.PortOpen = True
  20.  
  21. End Sub
even that i declare that the portopen = true it appears that it is close...
Feb 25 '13 #1
0 1152

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An...
1
by: hamid_2020 | last post by:
I wrote a class to connect to a server using tcpclient. I need to connect to the server and the connection must be open.Then i need to send request to the server again and again.But the problem is...
3
by: cpraveen10 | last post by:
Hi... I am trying to use MSComm for capturing serial data. The serial data is 1A2B3C1A2B3C1A2B3C1A2B3C...... so on which is coming from serial port. From that i have to capture A in the first text...
0
by: cpraveen10 | last post by:
I want to capture the data through serial port using the below program... The data is 1A2B3C1A2B3C.... From that i want to display A in first text box, B in second text box and C in third text box....
2
by: cpraveen10 | last post by:
Hi All... I am using MSComm to receive data serially in a text box. The data being recieved is 1A2B3C1A2B3C1A2B3C...........so on... I have read this into a text file. So I am now getting...
0
by: weird0 | last post by:
I dragged the GridView control and configured its source to using SqlDataSource1 and using a StoredProcedure. When i tested the query by passing a value, it gives the records correctly. The...
0
by: george585 | last post by:
Hello! I am new to network programming, and understand just basics. Using some sample code, and having read documentation, I managed to create a simple app in C# and VB.NET. The application is...
3
by: arial | last post by:
Hi all, I am not sure this question will belong to a sql group or .net. but the problem I have is, my data entry forms crashes when some enter a apostrophe character in one of the field. that...
0
by: =?Utf-8?B?QmlsbCBC?= | last post by:
I am having a problem where no data is being returned from an Axis web service. I can invoke the service just fine and it does not give any errors, but the data objects do not hold any data. If I...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.