Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: Re: Using ADO with a customer ActiveX object


Message #1 by "Ken Oppenheimer" <oppenhk@a...> on Sat, 9 Nov 2002 23:43:57
> Hi
> 
> I am converting code from using DAO to ADO. Much of the code is in 
> ActiveX dlls.
> 
> With DAO I could create a db object in the main app and set a property 
> with it in an instance of the ActiveX dll and hence have a db connection 
> with the ActiveX dll.
> 
> I am trying to do ths same with and ADO Connection object, but get the 
> following message when I try to use it (eg when assigning to the active 
> connection of  command object:
> 
> Arguments are of the wrong type, are out of acceptable range, or are in 
> conflict with one another.
> 
> Does anyone know why I can't do this, and is there a work round?
> 
> Thanks
> 
> David Billingham
> 
> PS If I do the same thing with a command object it works fine...........

I'm having the same exact problem.
I pass a ADODB.connection from the main app to a DLL.  In the DLL, I can 
open a recordset using that passed connection, but NOT if I use a newly 
created ADODB.command.  However, if I pass a adodb.command object and the 
connection from the main app to the DLL, then it works.

Anyone have a fix to this?

Ken

  Return to Index