🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sybase.public.powerbuilder.ole-ocx-activex
Article #1

Re: Error accessing external...MSCOMM32.OCX OLE Object

#1
From: sayed alnggar
Date: Thu, 20 Oct 2022 11:10
80 lines
4086 bytes
On Wednesday, April 13, 2005 at 7:23:08 AM UTC+3, danny wrote:
> I Found out that the com port is being use by ActiveSync,
> now is working fine, anyway thx..
> -danny-
> > PortOpen is a valid attribute? I typically use Excel's
> > object browser to look at these things. In excel, use Alt
> > F11 to go to the VB editor mode and then use the object
> > browser. (Use Tools References to add the object to the
> > list).
> >
> > --
> > Terry Dykstra (TeamSybase)
> > http://powerbuilder.codeXchange.sybase.com/
> > http://www.pb9books.com
> > product enhancement requests:
> > http://my.isug.com/cgi-bin/1/c/submit_enhancement
> >
> >
> > <danny> wrote in message
> > > news:425b4c85.307...@sybase.com...
> > > ole_1.object.CommPort = 1 ole_1.object.Settings = "9600
> > > ,N,8,1" ole_1.object.InputLen = 0
> > > if not ole_1.object.PortOpen then
> > > ole_1.object.PortOpen = true
> > > end if
> > >
> > > the error came from ole_1.object.PortOpen = true
> > > "Error accessing external object property portopen at
> > > line 5 in clicked event..."
> > >
> > > -danny-
> > > > Show some code. Without it we are completely
> > > guessing. >
> > > > --
> > > > Terry Dykstra (TeamSybase)
> > > > http://powerbuilder.codeXchange.sybase.com/
> > > > http://www.pb9books.com
> > > > product enhancement requests:
> > > > http://my.isug.com/cgi-bin/1/c/submit_enhancement
> > > >
> > > >
> > > > <danny> wrote in message
> > > > > news:425a4f2b.546...@sybase.com... Im
> > > > > getting error "Error calling external
> > > > > object...portopen..." while trying to open
> > > > > communication port, i have done a lot of trying out
> > > > > but still having the same problem, what am i missing
> > > > here ? Using PB 8.0.4 for this project..thx >
> > > > > -danny-
> > > >
> > > >
> >
> >
Hi All,
I'm trying to send a string to certain port using OLE object using powerbuilder 11.5 , below is the steps I have done:
- I registred the mscomm32.ocx 
- Created OLE object control and dropped it in a window
- Under button, I put te below code
ole_1.object.CommPort = 1
ole_1.object.Settings = "115200,n,8,1" // 9600 baud, no parity, 8 data, and 1 stop bit
ole_1.object.RThreshold = 1
ole_1.object.InputLen = 0 // Tell the control to read entire buffer when Input is used
ole_1.object.InputMode = 0

try
ole_1.object.PortOpen = True // Open the port
ole_1.object.Output = "Hello" // Send the attention command to the modem
CATCH (OLERuntimeError e)
   MessageBox("Port Open Failed", e.Text, StopSign!)
finally
	
lb_rtn = ole_1.Object.PortOpen = False
		
end try
//*************************************

when I press the button, I got an error message says:
"error accessing external object propperty portopen "

any help please ?
Technical Details
Message-ID: <bbe62e53-57be-4f80-af3f-dcc4fd1e581en@googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
References: <425c1091$1@forums-2-dub> <425c9eac.6ef2.1681692777@sybase.com>

Show Full Headers
Complete Article Headers
Message-ID: <bbe62e53-57be-4f80-af3f-dcc4fd1e581en@googlegroups.com>
Subject: Re: Error accessing external...MSCOMM32.OCX OLE Object
Date: Thu, 20 Oct 2022 11:10:10 +0000
From: sayed alnggar <eng.sayeddomar@gmail.com>
References: <425c1091$1@forums-2-dub> <425c9eac.6ef2.1681692777@sybase.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
X-Received: by 2002:ac8:5854:0:b0:39c:dba4:6fa0 with SMTP id h20-20020ac85854000000b0039cdba46fa0mr10391274qth.175.1666264211076; Thu, 20 Oct 2022 04:10:11 -0700 (PDT)
X-Received: by 2002:a81:1610:0:b0:367:b44f:3a6d with SMTP id 16-20020a811610000000b00367b44f3a6dmr4922548yww.38.1666264210782; Thu, 20 Oct 2022 04:10:10 -0700 (PDT)
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
In-Reply-To: <425c9eac.6ef2.1681692777@sybase.com>
Injection-Info: google-groups.googlegroups.com; posting-host=78.93.31.114; posting-account=mM5OcgoAAACu_eXtRWz6k2ErA_uVjTHE
Nntp-Posting-Host: 78.93.31.114
User-Agent: G2/1.0
Mime-Version: 1.0
Injection-Date: Thu, 20 Oct 2022 11:10:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 79