Home > Archive > microsoft.public.cert.exam.mcsd > December 2002 > MSMQ





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author MSMQ
Vishwa

2002-12-19, 2:23 pm

Hi All,

I have a COM component using MQ_PEEK_ACCESS peek option of
MSMQ it is working fine, if I use same logic in the asp
page it's not working

I am using like this:
set Objq = qinfo. Open(MQ_PEEK_ACCESS,MQ_DENY_NO
NE)

Thanks in advance,

Vishawa
Jason Mauss

2002-12-19, 3:23 pm

Vishwa,
That's because in a COM component you're dealing with the VB
runtime...and it can use COM to look up that enumeration or constant value
from the MSMQ type library. That is not available with interpreted script
like VBScript. What you'll need to do is eithier substitute the
corresponding integer value for MQ_PEEK_ACCESS or create an include file
(like the infamous abovbs.inc) that contains mappings for those constants
you'd like to use. If you're going to be using the Open method in many
places, I would suggest creating an include file. If not, I would just pass
the open method the integers and maybe add a comment above stating that
something like integer 3 is MQ_PEEK_ACCESS or something.

Just to clarify what I said....imagine you're using ADO in a Visual Basic
application.

Writing something like "Recordset.Open("SELECT * FROM TABLENAME",objConn,
adOpenDynamic, adUseClient) is fine...because COM can find out what
'adOpenDynamic' and 'adUseClient' equal in terms of an integer value.

With VBScript, you can't do this...You are using late-binding (with
CreateObject) to create your objects thus, COM is unable to lookup the
references to constants like MQ_PEEK_ACCESS.

Hope this helps,
Jason Mauss
MCAD.NET, MCSD, MCDBA, MCT

"Vishwa" <vsrk_chary@hotmail.com> wrote in message
news:072101c2a79a$2f7d2cd0$8df
82ecf@TK2MSFTNGXA02...
> Hi All,
>
> I have a COM component using MQ_PEEK_ACCESS peek option of
> MSMQ it is working fine, if I use same logic in the asp
> page it's not working
>
> I am using like this:
> set Objq = qinfo. Open(MQ_PEEK_ACCESS,MQ_DENY_NO
NE)
>
> Thanks in advance,
>
> Vishawa



Vishwa

2002-12-19, 3:23 pm

Hi Jason,

Thank you for the reply.

Where can I get constant values? I have searched for the
constants in the MSDN but I could not find them.

Please let me know if you have any idea.

Thanks once again.

Vishwa


>-----Original Message-----
>Vishwa,
> That's because in a COM component you're dealing with

the VB
>runtime...and it can use COM to look up that enumeration

or constant value
>from the MSMQ type library. That is not available with

interpreted script
>like VBScript. What you'll need to do is eithier

substitute the
>corresponding integer value for MQ_PEEK_ACCESS or create

an include file
>(like the infamous abovbs.inc) that contains mappings for

those constants
>you'd like to use. If you're going to be using the Open

method in many
>places, I would suggest creating an include file. If not,

I would just pass
>the open method the integers and maybe add a comment

above stating that
>something like integer 3 is MQ_PEEK_ACCESS or something.
>
>Just to clarify what I said....imagine you're using ADO

in a Visual Basic
>application.
>
>Writing something like "Recordset.Open("SELECT * FROM

TABLENAME",objConn,
>adOpenDynamic, adUseClient) is fine...because COM can

find out what
>'adOpenDynamic' and 'adUseClient' equal in terms of an

integer value.
>
>With VBScript, you can't do this...You are using late-

binding (with
>CreateObject) to create your objects thus, COM is unable

to lookup the
>references to constants like MQ_PEEK_ACCESS.
>
>Hope this helps,
>Jason Mauss
>MCAD.NET, MCSD, MCDBA, MCT
>
>"Vishwa" <vsrk_chary@hotmail.com> wrote in message
> news:072101c2a79a$2f7d2cd0$8df
82ecf@TK2MSFTNGXA02...
>> Hi All,
>>
>> I have a COM component using MQ_PEEK_ACCESS peek option

of
>> MSMQ it is working fine, if I use same logic in the asp
>> page it's not working
>>
>> I am using like this:
>> set Objq = qinfo. Open(MQ_PEEK_ACCESS,MQ_DENY_NO
NE)
>>
>> Thanks in advance,
>>
>> Vishawa

>
>
>.
>

Jason Mauss

2002-12-19, 4:23 pm

Sure, open the Visual Basic project you did for the MSMQ COM component, and
View the Object Browser (hit F2 key) and search the MSMQ Type Library for
MQ_PEEK_ACCESS . When you find it, it should tell you what the corresponding
integer value for MQ_PEEK_ACCESS is.

Jason

"Vishwa" <vsrk_chary@hotmail.com> wrote in message
news:078f01c2a7a1$21f87720$8df
82ecf@TK2MSFTNGXA02...
> Hi Jason,
>
> Thank you for the reply.
>
> Where can I get constant values? I have searched for the
> constants in the MSDN but I could not find them.
>
> Please let me know if you have any idea.
>
> Thanks once again.
>
> Vishwa
>
>
> >-----Original Message-----
> >Vishwa,
> > That's because in a COM component you're dealing with

> the VB
> >runtime...and it can use COM to look up that enumeration

> or constant value
> >from the MSMQ type library. That is not available with

> interpreted script
> >like VBScript. What you'll need to do is eithier

> substitute the
> >corresponding integer value for MQ_PEEK_ACCESS or create

> an include file
> >(like the infamous abovbs.inc) that contains mappings for

> those constants
> >you'd like to use. If you're going to be using the Open

> method in many
> >places, I would suggest creating an include file. If not,

> I would just pass
> >the open method the integers and maybe add a comment

> above stating that
> >something like integer 3 is MQ_PEEK_ACCESS or something.
> >
> >Just to clarify what I said....imagine you're using ADO

> in a Visual Basic
> >application.
> >
> >Writing something like "Recordset.Open("SELECT * FROM

> TABLENAME",objConn,
> >adOpenDynamic, adUseClient) is fine...because COM can

> find out what
> >'adOpenDynamic' and 'adUseClient' equal in terms of an

> integer value.
> >
> >With VBScript, you can't do this...You are using late-

> binding (with
> >CreateObject) to create your objects thus, COM is unable

> to lookup the
> >references to constants like MQ_PEEK_ACCESS.
> >
> >Hope this helps,
> >Jason Mauss
> >MCAD.NET, MCSD, MCDBA, MCT
> >
> >"Vishwa" <vsrk_chary@hotmail.com> wrote in message
> > news:072101c2a79a$2f7d2cd0$8df
82ecf@TK2MSFTNGXA02...
> >> Hi All,
> >>
> >> I have a COM component using MQ_PEEK_ACCESS peek option

> of

> >> MSMQ it is working fine, if I use same logic in the asp
> >> page it's not working
> >>
> >> I am using like this:
> >> set Objq = qinfo. Open(MQ_PEEK_ACCESS,MQ_DENY_NO
NE)
> >>
> >> Thanks in advance,
> >>
> >> Vishawa

> >
> >
> >.
> >



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net