473,796 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
+ 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 4135
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
4334
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 CDONTS component method. Can I just to localhost server to test, whether the form can be send up to the admin's email. Or I must have the Hosting server to do that. Can Anyone suggest me, how to I test my scripts can be successfully run (at...
0
2536
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 = "el@illico.fr" mail.From = "el@illico.fr" mail.Subject = "test envoi de mail" mail.Body = "test envoi de mail"
2
1838
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 use the SmtpMail object to send email (to & from addresses are both on my local SMTP server) I get the following errors. Exception: Could not access 'CDO.Message' object. InnerException: Exception has been thrown by the target of an invocation....
4
2726
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
5163
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 Microsoft. You can find it overhere: http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en I did found a lot about the RS232 port on the Internet, but i haven't found the same amount of...
13
21705
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 data in the string being sent to the printer. However, if I prompt the user for data or if I insert data from a particular record/field in a form Access crashes/closes on its own. I have included the code below, if anyone has any suggestions,...
2
3501
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 application, and also succeeds from the asp.net page with BodyFormat=MailFormat.Text. I've recently upgraded from W2K SP4 to WinXP SP2 and am using .Net Framework v1.1 SP1. The code worked fine under W2K SP4.
6
4062
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 close the connection? Can it have something to do with Async/sync read/write???? Everything works when I just type the commands i Hyper Terminal I get the respond as I should...
3
1864
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 came with vb6). This worked on my computer, but after deploy on the computer the programm is supposed to run on, i encountered errors...
0
10453
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.