473,468 Members | 1,294 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I send a string using MS Access 2003 to an RS232 port?

3 New Member
Hi, I'm trying to send a small string to a serial port rs232 located in com 4.

the string is: "ST GA#ˇ"
The Baud Rate is: 38400
Parity: None
Data Bits: 8
Stops Bits: 1
Flow Control: None
COM: 4

I don't really need to read the com, I just need to send this line to the selected com.
I have not idea to create this code in MS Access 2003.
can anyone help me on this?

THX.
Oct 1 '07 #1
5 4103
FishVal
2,653 Recognized Expert Specialist
Hi, I'm trying to send a small string to a serial port rs232 located in com 4.

the string is: "ST GA#ˇ"
The Baud Rate is: 38400
Parity: None
Data Bits: 8
Stops Bits: 1
Flow Control: None
COM: 4

I don't really need to read the com, I just need to send this line to the selected com.
I have not idea to create this code in MS Access 2003.
can anyone help me on this?

THX.
Hi, Canuno.
Did you try to open COM4 as file. Like this:
Expand|Select|Wrap|Line Numbers
  1. Open "COM4" For Binary Access Write As #1
  2. Print #1, "ST GA#ˇ"
  3. Close #1
  4.  
Oct 1 '07 #2
Canuno
3 New Member
Hi, Canuno.
Did you try to open COM4 as file. Like this:
Expand|Select|Wrap|Line Numbers
  1. Open "COM4" For Binary Access Write As #1
  2. Print #1, "ST GA#ˇ"
  3. Close #1
  4.  

Yes I did, and I got an Run time error 54, Bad File Mode.
Oct 2 '07 #3
FishVal
2,653 Recognized Expert Specialist
Yes I did, and I got an Run time error 54, Bad File Mode.
Try another open mode.
Expand|Select|Wrap|Line Numbers
  1. Open "COM4" For Output As #1
  2. Print #1, "ST GA#ˇ"
  3. Close #1
  4.  
Oct 2 '07 #4
Canuno
3 New Member
Excelent!!! It works now. great job, I really apreciate it.
canuno@hotmail.com
Oct 2 '07 #5
FishVal
2,653 Recognized Expert Specialist
You are welcome.

Best regards.
Fish.


P.S. plz avoid posting your e-mail unless you are calling for spammers.
Oct 2 '07 #6

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

Similar topics

4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
0
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To =...
2
by: Terry Olsen | last post by:
I'm running on Windows Server 2003, Exchange 2003, ASP.NET (Framework 1.1) I can send mail using an email client, telnetting in to the SMTP port and manually sending the email, but when I try to...
4
by: leovg | last post by:
Can I access the serial port (RS232) out of an ASP.NET 2.0 client form? We are planning a barcode application where a barcode scanner delivers input to an ASP.NET form via RS232.
2
by: Wouter van Teijlingen | last post by:
Dear Readers, I was reading about how to control the COM and LPT port using VB .NET. I've found a lot of information, and it was very useful to me. I found an example program on the site of...
13
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual...
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
6
by: Henning M | last post by:
Hi all, Im trying to send a command to my uprocessor project, but when i try to read the answer for the uPU I get the same commed I just send to it??? It is as if the command isn't send before I...
3
by: Wim Linders | last post by:
Hi, I have to capture data from the com-port that comes from a barcode-scanner with rs232-cable. What is the best way to do it in .net? In my first attempt i used the msComm-ocx (the one that...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.