Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2004, 12:43 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default RS-232 serial communications

I want to make an Access database that I can use to send and receive ASCII text files using the serial port on my computer. I don't need any special protocals, just hardware or software handshaking (Xon/Xoff).

I am sending a text file to and from a mcahine tool control, which in spite of the high cost, is pretty simple/dumb.

I have never worked with the MSComm control (or any other serial OCX or DLL) and was looking for some examples to learn from.
__________________
Mitch
 
Old April 23rd, 2004, 07:50 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

I believe you have to use ms comm control
Here is some information

http://www.yes-tele.com/mscomm.html
MS Comm Control
The MS Comm control comes with Visual Basic. This one came with VB 6.0. We have a license to distribute this OCX with our Visual Basic application. We have tried in to get a clarification from Microsoft if it is OK to distribute stand alone. We asked: "Do we have the right to distribute the MS Comm control which comes with Visual Basic with an Access application?" When this question was asked of the MS Access technical support people we could not find anyone that knew what the MS Comm control is. The closest we got was someone that thought we were talking about the Common Dialog control. It is our assumption that because we have the right to distribute this with a VB application we also should have the right to distribute it stand-alone.

This is the MSCOMM32.OCX that should be stored in your \windows\system directory.

To register within Access go to TOOLS/ACTIVE X CONTROLS and select \windows\system\mscomm32.ocx or Microsoft Communications Control and click on the REGISTER button.

If you get a licensing error the only way we know to get the licensing is to install VB 6 Professional. Microsoft Technical Support and Sales Staff was of no use when we tried find out how to register or purchase the Comm control.

Download Now mscomm.zip 50K bytes

Private Sub MSComm1_OnComm()
    Select Case MSComm1.CommEvent
        Case comEventBreak ' A Break was received.
        Case comEventCDTO ' CD (RLSD) Timeout.
        Case comEventCTSTO ' CTS Timeout.
        Case comEventDSRTO ' DSR Timeout.
        Case comEventFrame ' Framing Error.
        Case comEventOverrun ' Data Lost.
        Case comEventRxOver ' Receive buffer overflow.
        Case comEventRxParity ' Parity Error.
        Case comEventTxFull ' Transmit buffer full.
        Case comEventDCB ' Unexpected error retrieving DCB]

         ' Events
        Case comEvCD ' Change in the CD line.
        Case comEvCTS ' Change in the CTS line.
        Case comEvDSR ' Change in the DSR line.
        Case comEvRing ' Change in the Ring Indicator.
        Case comEvReceive ' Received RThreshold # of chars.
            'Sets the global mstinbuff to = what is received by the commm control
            mstInBuff = mstInBuff & MSComm1.Input
            'Resets the variable used to count the lack of response to 0 so that
            'counting restarts.
            mdblReceived = 0

    End Select
End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
RS-232 and Access 2007 VBA database Gajun BOOK: Beginning Access 2007 VBA ISBN: 978-0-470-04684-5 1 June 2nd, 2010 11:08 AM
Communications News softomania JSP Basics 0 October 27th, 2008 12:57 PM
Serial communications Allan- VB How-To 0 November 23rd, 2005 12:40 PM
Serial port communications Skoog C# 1 September 28th, 2005 09:18 AM
RS Manager and RS Server on 2 different computers Choose File BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 22nd, 2004 10:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.