Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error accessing external...MSCOMM32.OCX OLE Object

345 views
Skip to first unread message

danny

unread,
Apr 11, 2005, 6:19:23 AM4/11/05
to
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-

Terry Dykstra

unread,
Apr 11, 2005, 12:14:01 PM4/11/05
to
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...

danny

unread,
Apr 12, 2005, 12:20:23 AM4/12/05
to
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-

Terry Dykstra

unread,
Apr 12, 2005, 2:16:53 PM4/12/05
to
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).


<danny> wrote in message news:425b4c85.307...@sybase.com...

danny

unread,
Apr 13, 2005, 12:23:08 AM4/13/05
to
I Found out that the com port is being use by ActiveSync,
now is working fine, anyway thx..

-danny-

sayed alnggar

unread,
Oct 20, 2022, 7:10:11 AM10/20/22
to
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 ?
0 new messages