Hello
I am using a form with MSCOMM to comunicate with A MICR
Reader connected to it on com1. I have the com port set
on the ININ Event thru passed variables from the calling
procedure. I then wait for input from the MICR reader and
simply write each line to a .dbf. The form works fine in
development under foxpro but when I compile the project i
consistantly get an error "OLE IDispatch exception code 0"
from the forms "MICRREAD.CPORT.INIT" Procedure which
contains
this.commport = micrcom && 1
this.settings = micrset && "9600,N,8,1"
THIS.PortOpen = .T.

What would cause it not to run compiled as an exe but to
run ok under foxpro?
Thanks
Glen

Re: Comm already open? by Edhy

Edhy
Sat Sep 13 13:18:26 CDT 2003

I found that using a MICR reader with a keyboard is more reliable than going
with the COM ports, specially this days when most computers will come with
only one COM port.

You can find keyboard MICR Readers anywhere, but I got mines from
www.iepos.com


--
Edhy Rijo
Programming System Solutions www.progytech.com
Bronx NY
"Glen Wagner" <mozillapost@hotmail.com> wrote in message
news:057d01c37976$5becc010$a101280a@phx.gbl...
> Hello
> I am using a form with MSCOMM to comunicate with A MICR
> Reader connected to it on com1. I have the com port set
> on the ININ Event thru passed variables from the calling
> procedure. I then wait for input from the MICR reader and
> simply write each line to a .dbf. The form works fine in
> development under foxpro but when I compile the project i
> consistantly get an error "OLE IDispatch exception code 0"
> from the forms "MICRREAD.CPORT.INIT" Procedure which
> contains
> this.commport = micrcom && 1
> this.settings = micrset && "9600,N,8,1"
> THIS.PortOpen = .T.
>
> What would cause it not to run compiled as an exe but to
> run ok under foxpro?
> Thanks
> Glen
>



Re: Comm already open? by Glen

Glen
Mon Sep 15 22:01:24 CDT 2003

Thanks for the input. I already have a programable
keyboard and Bar Code Scanner on the keyboard wedge,
along with a Grocery Scale on one of the other comm
ports. Sure would be nice if everything switched over to
USB :P
Glen
>-----Original Message-----
>I found that using a MICR reader with a keyboard is more
reliable than going
>with the COM ports, specially this days when most
computers will come with
>only one COM port.
>
>You can find keyboard MICR Readers anywhere, but I got
mines from
>www.iepos.com
>
>
>--
>Edhy Rijo
>Programming System Solutions www.progytech.com
>Bronx NY
>"Glen Wagner" <mozillapost@hotmail.com> wrote in message
>news:057d01c37976$5becc010$a101280a@phx.gbl...
>> Hello
>> I am using a form with MSCOMM to comunicate with A MICR
>> Reader connected to it on com1. I have the com port set
>> on the ININ Event thru passed variables from the calling
>> procedure. I then wait for input from the MICR reader
and
>> simply write each line to a .dbf. The form works fine
in
>> development under foxpro but when I compile the project
i
>> consistantly get an error "OLE IDispatch exception code
0"
>> from the forms "MICRREAD.CPORT.INIT" Procedure which
>> contains
>> this.commport = micrcom && 1
>> this.settings = micrset && "9600,N,8,1"
>> THIS.PortOpen = .T.
>>
>> What would cause it not to run compiled as an exe but to
>> run ok under foxpro?
>> Thanks
>> Glen
>>
>
>
>.
>

Re: Comm already open? by Rick

Rick
Tue Sep 16 09:21:32 CDT 2003

Glen,
The best source of MS version information is the DLL Database - =
http://support.microsoft.com/default.aspx?scid=3D/servicedesks/fileversio=
n/dllinfo.asp&SD=3Dmsdn (yup .OCX's are actually .DLL's!)=20

It shows the latest version as 6.0.81.69 and it came with the =
VS/VB/VC++/VFP 6.0 releases.

Rick

"Glen Wagner" <mozillapost@hotmail.com> wrote in message =
news:3bcc01c37bfe$8af09c80$a501280a@phx.gbl...
> Thanks for the Tip! Just to confirm yours worked under=20
> foxpro but no as a atand alone app? Thats the case with=20
> mine. Also do you know where I can download another=20
> mscomm32.ocx or compare to the one I have from VFP6.
> Glen
> >-----Original Message-----
> >I have had a similar problem caused by the version of=20
> mscomm32.ocx that was
> >registered on my machine. As a matter of fact the control=20
> that is installed
> >with VFP5 or 6 would not work, but if I installed VB6 the=20
> control worked. I
> >now copy a known good mscomm32.ocx to the target machine=20
> and register it
> >seperately and not allow the installer to register it.=20
> Also if the comm port
> >is not avaliable a similar error will occur.
> >
> >jrg
> >
> >
> >"Glen Wagner" <mozillapost@hotmail.com> wrote in message
> >news:057d01c37976$5becc010$a101280a@phx.gbl...
> >> Hello
> >> I am using a form with MSCOMM to comunicate with A MICR
> >> Reader connected to it on com1. I have the com port set
> >> on the ININ Event thru passed variables from the calling
> >> procedure. I then wait for input from the MICR reader=20
> and
> >> simply write each line to a .dbf. The form works fine=20
> in
> >> development under foxpro but when I compile the project=20
> i
> >> consistantly get an error "OLE IDispatch exception code=20
> 0"
> >> from the forms "MICRREAD.CPORT.INIT" Procedure which
> >> contains
> >> this.commport =3D micrcom && 1
> >> this.settings =3D micrset && "9600,N,8,1"
> >> THIS.PortOpen =3D .T.
> >>
> >> What would cause it not to run compiled as an exe but to
> >> run ok under foxpro?
> >> Thanks
> >> Glen
> >>
> >
> >
> >.
> >

Re: Comm already open? by Glen

Glen
Tue Sep 16 13:12:41 CDT 2003

Well 6.0.81.69 is the version I have which brings me back
to "What would cause an application that reads the comm
port to work properly in a development environment but
return and error OLE IDispatch exception code 0 in a run
time environment"? saying Comm port 1 is already open.
I am using a similar application to moniter the port the
scale is on "4" and it causes no error.
Glen

>-----Original Message-----
>Glen,
>The best source of MS version information is the DLL
Database - http://support.microsoft.com/default.aspx?
scid=/servicedesks/fileversion/dllinfo.asp&SD=msdn
(yup .OCX's are actually .DLL's!)
>
>It shows the latest version as 6.0.81.69 and it came
with the VS/VB/VC++/VFP 6.0 releases.
>
>Rick
>
>"Glen Wagner" <mozillapost@hotmail.com> wrote in message
news:3bcc01c37bfe$8af09c80$a501280a@phx.gbl...
>> Thanks for the Tip! Just to confirm yours worked under
>> foxpro but no as a atand alone app? Thats the case
with
>> mine. Also do you know where I can download another
>> mscomm32.ocx or compare to the one I have from VFP6.
>> Glen
>> >-----Original Message-----
>> >I have had a similar problem caused by the version of
>> mscomm32.ocx that was
>> >registered on my machine. As a matter of fact the
control
>> that is installed
>> >with VFP5 or 6 would not work, but if I installed VB6
the
>> control worked. I
>> >now copy a known good mscomm32.ocx to the target
machine
>> and register it
>> >seperately and not allow the installer to register it.
>> Also if the comm port
>> >is not avaliable a similar error will occur.
>> >
>> >jrg
>> >
>> >
>> >"Glen Wagner" <mozillapost@hotmail.com> wrote in
message
>> >news:057d01c37976$5becc010$a101280a@phx.gbl...
>> >> Hello
>> >> I am using a form with MSCOMM to comunicate with A
MICR
>> >> Reader connected to it on com1. I have the com port
set
>> >> on the ININ Event thru passed variables from the
calling
>> >> procedure. I then wait for input from the MICR
reader
>> and
>> >> simply write each line to a .dbf. The form works
fine
>> in
>> >> development under foxpro but when I compile the
project
>> i
>> >> consistantly get an error "OLE IDispatch exception
code
>> 0"
>> >> from the forms "MICRREAD.CPORT.INIT" Procedure which
>> >> contains
>> >> this.commport = micrcom && 1
>> >> this.settings = micrset && "9600,N,8,1"
>> >> THIS.PortOpen = .T.
>> >>
>> >> What would cause it not to run compiled as an exe
but to
>> >> run ok under foxpro?
>> >> Thanks
>> >> Glen
>> >>
>> >
>> >
>> >.
>> >
>.
>

Re: Comm already open? by Rick

Rick
Tue Sep 16 13:45:22 CDT 2003

Glen,
Is this the same system, or a different one? Be aware of the SET =
settings that have different defaults in the two environments, make sure =
you explicitly set them in the application to be the same. By especially =
mindful of the whole group of SETs that get reset in each Private =
Datasession. (Set the Help file topic "SET DATASESSION Command" for a =
list.

Rick

"Glen Wagner" <mozillapost@hotmail.com> wrote in message =
news:461c01c37c7e$1e734460$a501280a@phx.gbl...
> Well 6.0.81.69 is the version I have which brings me back=20
> to "What would cause an application that reads the comm=20
> port to work properly in a development environment but=20
> return and error OLE IDispatch exception code 0 in a run=20
> time environment"? saying Comm port 1 is already open. =20
> I am using a similar application to moniter the port the=20
> scale is on "4" and it causes no error. =20
> Glen
>=20
> >-----Original Message-----
> >Glen,
> >The best source of MS version information is the DLL=20
> Database - http://support.microsoft.com/default.aspx?
> scid=3D/servicedesks/fileversion/dllinfo.asp&SD=3Dmsdn=20
> (yup .OCX's are actually .DLL's!)=20
> >
> >It shows the latest version as 6.0.81.69 and it came=20
> with the VS/VB/VC++/VFP 6.0 releases.
> >
> >Rick
> >
> >"Glen Wagner" <mozillapost@hotmail.com> wrote in message=20
> news:3bcc01c37bfe$8af09c80$a501280a@phx.gbl...
> >> Thanks for the Tip! Just to confirm yours worked under=20
> >> foxpro but no as a atand alone app? Thats the case=20
> with=20
> >> mine. Also do you know where I can download another=20
> >> mscomm32.ocx or compare to the one I have from VFP6.
> >> Glen
> >> >-----Original Message-----
> >> >I have had a similar problem caused by the version of=20
> >> mscomm32.ocx that was
> >> >registered on my machine. As a matter of fact the=20
> control=20
> >> that is installed
> >> >with VFP5 or 6 would not work, but if I installed VB6=20
> the=20
> >> control worked. I
> >> >now copy a known good mscomm32.ocx to the target=20
> machine=20
> >> and register it
> >> >seperately and not allow the installer to register it.=20
> >> Also if the comm port
> >> >is not avaliable a similar error will occur.
> >> >
> >> >jrg
> >> >
> >> >
> >> >"Glen Wagner" <mozillapost@hotmail.com> wrote in=20
> message
> >> >news:057d01c37976$5becc010$a101280a@phx.gbl...
> >> >> Hello
> >> >> I am using a form with MSCOMM to comunicate with A=20
> MICR
> >> >> Reader connected to it on com1. I have the com port=20
> set
> >> >> on the ININ Event thru passed variables from the=20
> calling
> >> >> procedure. I then wait for input from the MICR=20
> reader=20
> >> and
> >> >> simply write each line to a .dbf. The form works=20
> fine=20
> >> in
> >> >> development under foxpro but when I compile the=20
> project=20
> >> i
> >> >> consistantly get an error "OLE IDispatch exception=20
> code=20
> >> 0"
> >> >> from the forms "MICRREAD.CPORT.INIT" Procedure which
> >> >> contains
> >> >> this.commport =3D micrcom && 1
> >> >> this.settings =3D micrset && "9600,N,8,1"
> >> >> THIS.PortOpen =3D .T.
> >> >>
> >> >> What would cause it not to run compiled as an exe=20
> but to
> >> >> run ok under foxpro?
> >> >> Thanks
> >> >> Glen
> >> >>
> >> >
> >> >
> >> >.
> >> >
> >.
> >

Re: Comm already open? by Glen

Glen
Tue Sep 16 16:31:34 CDT 2003

Same system. When I try to launch it thru its .exe file
the program just flashes. It works fine from the command
line do getfrommicr.
I tried changing the datasession within the main form when
i change from the default 1 to 2 the form acts the same
from calling the .exe file just flashes but when i run it
from the command line with datasession set to 2 it echo's
some values to its own screen.
thanks Rick
Glen
>-----Original Message-----
>Glen,
>Is this the same system, or a different one? Be aware of
the SET settings that have different defaults in the two
environments, make sure you explicitly set them in the
application to be the same. By especially mindful of the
whole group of SETs that get reset in each Private
Datasession. (Set the Help file topic "SET DATASESSION
Command" for a list.
>
>Rick
>
>"Glen Wagner" <mozillapost@hotmail.com> wrote in message
news:461c01c37c7e$1e734460$a501280a@phx.gbl...
>> Well 6.0.81.69 is the version I have which brings me
back
>> to "What would cause an application that reads the comm
>> port to work properly in a development environment but
>> return and error OLE IDispatch exception code 0 in a
run
>> time environment"? saying Comm port 1 is already open.
>> I am using a similar application to moniter the port
the
>> scale is on "4" and it causes no error.
>> Glen
>>
>> >-----Original Message-----
>> >Glen,
>> >The best source of MS version information is the DLL
>> Database - http://support.microsoft.com/default.aspx?
>> scid=/servicedesks/fileversion/dllinfo.asp&SD=msdn
>> (yup .OCX's are actually .DLL's!)
>> >
>> >It shows the latest version as 6.0.81.69 and it came
>> with the VS/VB/VC++/VFP 6.0 releases.
>> >
>> >Rick
>> >
>> >"Glen Wagner" <mozillapost@hotmail.com> wrote in
message
>> news:3bcc01c37bfe$8af09c80$a501280a@phx.gbl...
>> >> Thanks for the Tip! Just to confirm yours worked
under
>> >> foxpro but no as a atand alone app? Thats the case
>> with
>> >> mine. Also do you know where I can download another
>> >> mscomm32.ocx or compare to the one I have from VFP6.
>> >> Glen
>> >> >-----Original Message-----
>> >> >I have had a similar problem caused by the version
of
>> >> mscomm32.ocx that was
>> >> >registered on my machine. As a matter of fact the
>> control
>> >> that is installed
>> >> >with VFP5 or 6 would not work, but if I installed
VB6
>> the
>> >> control worked. I
>> >> >now copy a known good mscomm32.ocx to the target
>> machine
>> >> and register it
>> >> >seperately and not allow the installer to register
it.
>> >> Also if the comm port
>> >> >is not avaliable a similar error will occur.
>> >> >
>> >> >jrg
>> >> >
>> >> >
>> >> >"Glen Wagner" <mozillapost@hotmail.com> wrote in
>> message
>> >> >news:057d01c37976$5becc010$a101280a@phx.gbl...
>> >> >> Hello
>> >> >> I am using a form with MSCOMM to comunicate with
A
>> MICR
>> >> >> Reader connected to it on com1. I have the com
port
>> set
>> >> >> on the ININ Event thru passed variables from the
>> calling
>> >> >> procedure. I then wait for input from the MICR
>> reader
>> >> and
>> >> >> simply write each line to a .dbf. The form works
>> fine
>> >> in
>> >> >> development under foxpro but when I compile the
>> project
>> >> i
>> >> >> consistantly get an error "OLE IDispatch
exception
>> code
>> >> 0"
>> >> >> from the forms "MICRREAD.CPORT.INIT" Procedure
which
>> >> >> contains
>> >> >> this.commport = micrcom && 1
>> >> >> this.settings = micrset && "9600,N,8,1"
>> >> >> THIS.PortOpen = .T.
>> >> >>
>> >> >> What would cause it not to run compiled as an exe
>> but to
>> >> >> run ok under foxpro?
>> >> >> Thanks
>> >> >> Glen
>> >> >>
>> >> >
>> >> >
>> >> >.
>> >> >
>> >.
>> >
>.
>