Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Using MSComm - important
Hi all,
I've got a question to all of you who have used the MSCOMM32.OCX.
I've imported all it's methods and events and tried to send something to
fiskal printer but i couldn't :((
Here is a piece of my code : ( interface is a variable correspods to
:item('IO_BLOCK.IO_ITEM').interface
variant is OleVar type value
...
settings:='9600,N,8,1';
XMCommVBA_XMComm.CommPort(interface,1); -- choosing COM1 XMCommVBA_XMComm.Settings(interface,ust); -- setting this port XMCommVBA_XMComm.PortOpen(interface,1); -- opening port (i think so, but when I try to see -- if port is open i got -1) message( XMCommVBA_XMComm.PortOpen(interface)); -- why I've got -1 ??? text:='sample text'; -- making sample text to be send variant:=(to_variant(text,VT_BSTR)); -- setting variant variable to text message(VAR_TO_CHAR(variant)); -- Ok i've got'sample text';