Thread View: sybase.public.powerbuilder.ole-ocx-activex
1 messages
1 total messages
Started by sayed alnggar
Thu, 20 Oct 2022 11:10
Re: Error accessing external...MSCOMM32.OCX OLE Object
Author: sayed alnggar
Date: Thu, 20 Oct 2022 11:10
Date: Thu, 20 Oct 2022 11:10
80 lines
4086 bytes
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 ?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads