COM+ question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • olsen.chris@gmail.com

    COM+ question

    I am passing parameters to a dataccess COM+ object so I needed to
    create a serializable class that would allow me to do this, which I
    did.

    Does this class have to inherit from the ServicedCompone nt class?

    If I do not inherit from the ServicedCompone nt class I get a "COM
    Interop registration failed. Could not find a type library for assembly
    'DatabaseParame ter'."

    If I do inherit from the class I get an error that says

    C:\Documents and Settings\chris. olsen\My Documents\Visua l Studio
    Projects\LABCOM \NUnitTests\Exe cuteNonQuery_Te sts.vb(300): Value of type
    '1-dimensional array of ABLearning.Data baseParameter' cannot be
    converted to '1-dimensional array of ABLearning.Data baseParameter'
    because 'ABLearning.Dat abaseParameter' is not derived from
    'ABLearning.Dat abaseParameter' .

    The above is the wierd part since it is having problems converting
    DatabaseParamet er to DatabaseParamet er


    If I go with the second altenative what is the proper way to reference
    the dll's? Currently I am addin the dll's as references that reside in
    the ProgramFiles\CO M+Applications\ LABCOM folder. Since the dataaccess
    (LABCOM) contains the DatabaseParamet er class as arguements a copy of
    the DatabaseParamet er class is also created in the same folder.



    I really need some help on this one. Thanks

  • cbDevelopment

    #2
    Re: COM+ question

    The classes you pass to COM+ as parameters should not inherit from
    servicedcompone nt. Obviously any other classes these parameters
    reference to need to be serializable.

    I would also make sure you are using an unchanging version number for
    your projects (not 1.0.*, but 1.0.0.0)

    --
    ----
    700cb Development, Inc.

    ..NET utilities, developer tools,
    and enterprise solutions

    olsen.chris@gma il.com wrote in news:1139337779 .402448.115420
    @g44g2000cwa.go oglegroups.com:
    [color=blue]
    > I am passing parameters to a dataccess COM+ object so I needed to
    > create a serializable class that would allow me to do this, which I
    > did.
    >
    > Does this class have to inherit from the ServicedCompone nt class?
    >
    > If I do not inherit from the ServicedCompone nt class I get a "COM
    > Interop registration failed. Could not find a type library for assembly
    > 'DatabaseParame ter'."
    >
    > If I do inherit from the class I get an error that says
    >
    > C:\Documents and Settings\chris. olsen\My Documents\Visua l Studio
    > Projects\LABCOM \NUnitTests\Exe cuteNonQuery_Te sts.vb(300): Value of type
    > '1-dimensional array of ABLearning.Data baseParameter' cannot be
    > converted to '1-dimensional array of ABLearning.Data baseParameter'
    > because 'ABLearning.Dat abaseParameter' is not derived from
    > 'ABLearning.Dat abaseParameter' .
    >
    > The above is the wierd part since it is having problems converting
    > DatabaseParamet er to DatabaseParamet er
    >
    >
    > If I go with the second altenative what is the proper way to reference
    > the dll's? Currently I am addin the dll's as references that reside in
    > the ProgramFiles\CO M+Applications\ LABCOM folder. Since the dataaccess
    > (LABCOM) contains the DatabaseParamet er class as arguements a copy of
    > the DatabaseParamet er class is also created in the same folder.
    >
    >
    >
    > I really need some help on this one. Thanks
    >
    >[/color]

    Comment

    Working...