Passing object Reference with ActiveX EXE 
Author Message
 Passing object Reference with ActiveX EXE

I was hoping to develope an activeX exe that would allow a computer user to login to a database from deferent clients and return a reference for the connection object (I'm using ADO) to the client.

The problem is although the connection is returned to client, it is not usable to retreive data.  But I am able to retrieve the connection object properties.

It is possible to return a reference for connection object (that's useable) from an ActiveX EXE to client application.

If so, how?



Tue, 29 Jan 2002 03:00:00 GMT  
 Passing object Reference with ActiveX EXE

Yes it is possible. You shouldn't have any problems. Not sure what you meant by "not usable to retrieve data".

--
Mark Freeman
MCSE, MCT, MCP-VB6, A+


  I was hoping to develope an activeX exe that would allow a computer user to login to a database from deferent clients and return a reference for the connection object (I'm using ADO) to the client.

  The problem is although the connection is returned to client, it is not usable to retreive data.  But I am able to retrieve the connection object properties.

  It is possible to return a reference for connection object (that's useable) from an ActiveX EXE to client application.

  If so, how?



Tue, 29 Jan 2002 03:00:00 GMT  
 Passing object Reference with ActiveX EXE

When I tried to use the connection object to returned by the ActiveX EXE, I the following error message in bold italic:
Runtime 3001: The application is using arguments that are of the wrong type, are out of acceptable arrange, or are in conflict with one another.

Code that caused the error:
    Set cStorTrak = New StorTrak  ' ActiveX EXE object
    Set clogin = cStorTrak.Login ' ActiveX EXE object
    Set rs = New Recordset

    clogin.Login "marlon", Empty
    Set cn = clogin.Connection
    rs.Open "product", cn, , , adCmdTable  '  This line caused the error when I try used the object to open a recordset
    Set Adodc1.Recordset = rs


  Yes it is possible. You shouldn't have any problems. Not sure what you meant by "not usable to retrieve data".

  --
  Mark Freeman
  MCSE, MCT, MCP-VB6, A+


    I was hoping to develope an activeX exe that would allow a computer user to login to a database from deferent clients and return a reference for the connection object (I'm using ADO) to the client.

    The problem is although the connection is returned to client, it is not usable to retreive data.  But I am able to retrieve the connection object properties.

    It is possible to return a reference for connection object (that's useable) from an ActiveX EXE to client application.

    If so, how?



Tue, 29 Jan 2002 03:00:00 GMT  
 Passing object Reference with ActiveX EXE
You cannot pass connection object cross-process, as ADO does
not marshall the connection.

You can run Connection.Execute cross-process, but you cannot
set any property like ActiveConnection or pass into a param
any Connection object that comes from another process.

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL!) :-)

random junk of dubious value is at:
http://www.trigeminal.com


When I tried to use the connection object to returned by the
ActiveX EXE, I the following error message in bold italic:
Runtime 3001: The application is using arguments that are of
the wrong type, are out of acceptable arrange, or are in
conflict with one another.

Code that caused the error:
    Set cStorTrak = New StorTrak  ' ActiveX EXE object
    Set clogin = cStorTrak.Login ' ActiveX EXE object
    Set rs = New Recordset

    clogin.Login "marlon", Empty
    Set cn = clogin.Connection
    rs.Open "product", cn, , , adCmdTable  '  This line
caused the error when I try used the object to open a
recordset
    Set Adodc1.Recordset = rs



  Yes it is possible. You shouldn't have any problems. Not
sure what you meant by "not usable to retrieve data".

  --
  Mark Freeman
  MCSE, MCT, MCP-VB6, A+



    I was hoping to develope an activeX exe that would allow
a computer user to login to a database from deferent clients
and return a reference for the connection object (I'm using
ADO) to the client.

    The problem is although the connection is returned to
client, it is not usable to retreive data.  But I am able to
retrieve the connection object properties.

    It is possible to return a reference for connection
object (that's useable) from an ActiveX EXE to client
application.

    If so, how?



Tue, 29 Jan 2002 03:00:00 GMT  
 Passing object Reference with ActiveX EXE
So who's right .. Karl said its possible, Michael says its not.

Well ..?


Quote:
>You cannot pass connection object cross-process, as ADO does
>not marshall the connection.

>You can run Connection.Execute cross-process, but you cannot
>set any property like ActiveConnection or pass into a param
>any Connection object that comes from another process.

>--
>MichKa

>-------------------------------------
>don't send questions by e-mail unless
>you're paying for it. (TANSTAAFL!) :-)

>random junk of dubious value is at:
>http://www.trigeminal.com



>When I tried to use the connection object to returned by the
>ActiveX EXE, I the following error message in bold italic:
>Runtime 3001: The application is using arguments that are of
>the wrong type, are out of acceptable arrange, or are in
>conflict with one another.

>Code that caused the error:
>    Set cStorTrak = New StorTrak  ' ActiveX EXE object
>    Set clogin = cStorTrak.Login ' ActiveX EXE object
>    Set rs = New Recordset

>    clogin.Login "marlon", Empty
>    Set cn = clogin.Connection
>    rs.Open "product", cn, , , adCmdTable  '  This line
>caused the error when I try used the object to open a
>recordset
>    Set Adodc1.Recordset = rs



>  Yes it is possible. You shouldn't have any problems. Not
>sure what you meant by "not usable to retrieve data".

>  --
>  Mark Freeman
>  MCSE, MCT, MCP-VB6, A+



>    I was hoping to develope an activeX exe that would allow
>a computer user to login to a database from deferent clients
>and return a reference for the connection object (I'm using
>ADO) to the client.

>    The problem is although the connection is returned to
>client, it is not usable to retreive data.  But I am able to
>retrieve the connection object properties.

>    It is possible to return a reference for connection
>object (that's useable) from an ActiveX EXE to client
>application.

>    If so, how?



Tue, 29 Jan 2002 03:00:00 GMT  
 Passing object Reference with ActiveX EXE
I worked extensively on a component for the SQL Server 7.0
product that was able to be embedded as an add-in into
Access 2000. It was here that I was introduced to the fact
that ADO does not support out-of-proc marshalling of
"connected" connection objects, which meant the only way to
use the pre-existing Access connection in the add-in (which
was an activex exe) was to use Connection.Execute to get
recordsets (which sucked since you can not change many
options such as cursor types).

This was considered by design by the MDAC folks for ADO 2.0,
2.1, and 2.5.

We received the exact error you are reporting (the 3001
error). It happened any time we tried to either:

1) Set ActiveConnection on a Command or Recordset object to
the out-or-proc Connection.
2) Pass the out-ot-proc Connection to Recordset.Open.

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL!) :-)

random junk of dubious value is at:
http://www.trigeminal.com


Quote:
> So who's right .. Karl said its possible, Michael says its
not.

> Well ..?
> Michael (michka) Kaplan


Quote:

> >You cannot pass connection object cross-process, as ADO
does
> >not marshall the connection.

> >You can run Connection.Execute cross-process, but you
cannot
> >set any property like ActiveConnection or pass into a
param
> >any Connection object that comes from another process.

> >--
> >MichKa

> >-------------------------------------
> >don't send questions by e-mail unless
> >you're paying for it. (TANSTAAFL!) :-)

> >random junk of dubious value is at:
> >http://www.trigeminal.com



> >When I tried to use the connection object to returned by
the
> >ActiveX EXE, I the following error message in bold
italic:
> >Runtime 3001: The application is using arguments that are
of
> >the wrong type, are out of acceptable arrange, or are in
> >conflict with one another.

> >Code that caused the error:
> >    Set cStorTrak = New StorTrak  ' ActiveX EXE object
> >    Set clogin = cStorTrak.Login ' ActiveX EXE object
> >    Set rs = New Recordset

> >    clogin.Login "marlon", Empty
> >    Set cn = clogin.Connection
> >    rs.Open "product", cn, , , adCmdTable  '  This line
> >caused the error when I try used the object to open a
> >recordset
> >    Set Adodc1.Recordset = rs



> >  Yes it is possible. You shouldn't have any problems.
Not
> >sure what you meant by "not usable to retrieve data".

> >  --
> >  Mark Freeman
> >  MCSE, MCT, MCP-VB6, A+



> >    I was hoping to develope an activeX exe that would
allow
> >a computer user to login to a database from deferent
clients
> >and return a reference for the connection object (I'm
using
> >ADO) to the client.

> >    The problem is although the connection is returned to
> >client, it is not usable to retreive data.  But I am able
to
> >retrieve the connection object properties.

> >    It is possible to return a reference for connection
> >object (that's useable) from an ActiveX EXE to client
> >application.

> >    If so, how?



Tue, 29 Jan 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Passing object Reference with ActiveX EXE

2. Passing references to ActiveX Exe object

3. Passing an object reference by reference where the object has a default property

4. Passing values by reference from java / vb script to ActiveX object

5. Passing values by reference from java / vb script to ActiveX object

6. Passing data between objects of a multithreaded ActiveX EXE

7. Removing ActiveX exe references from project->references

8. ActiveX component can't create object or return reference to this object (Error 429)

9. Activex component can't create object or return reference to this object (Error

10. Can't reference ActiveX EXE

11. ActiveX exe reference not found

12. Q. EXE and ActiveX DLL both reference DAO library

 

 
Powered by phpBB® Forum Software