ADODB.Command Connection Error in MTS object 
Author Message
 ADODB.Command Connection Error in MTS object

Sorry to cross-post, but I'm really stumped for ideas...

Anyone seen this:

Error# 3001
Source:      ADODB.Command
Description: The application is using arguments that are of the wrong type,
are out of acceptable range, or are in conflict with one another.

It occurs in a MTS-hosted class when I try to associate a (proven)
connection object to a command object using the .ActiveConnection property.

I have tried the Connection object in question with
RECORDSET.ActiveConnection and it works perfectly.

Any ideas,

Is this MTS or ADO?

Thanks in advance,

Seb Reeve - Consultant - Sabio Limited



Sat, 08 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object
It is not recommended to pass ADO connection objects between MTS components.
The way to do it is passing the connectionstring and reconnect every time.
Let the connection Pooling do the dirty work. The result is the same, but
you don't have the problems.

Filip


Quote:
> Sorry to cross-post, but I'm really stumped for ideas...

> Anyone seen this:

> Error# 3001
> Source:      ADODB.Command
> Description: The application is using arguments that are of the wrong
type,
> are out of acceptable range, or are in conflict with one another.

> It occurs in a MTS-hosted class when I try to associate a (proven)
> connection object to a command object using the .ActiveConnection
property.

> I have tried the Connection object in question with
> RECORDSET.ActiveConnection and it works perfectly.

> Any ideas,

> Is this MTS or ADO?

> Thanks in advance,

> Seb Reeve - Consultant - Sabio Limited



Sun, 09 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object

Many thanks, passing the Conn object was the problem.

Shame really as I wanted to centralise a Connection Factory object...

Ah well.

Seb Reeve - Consultant - Sabio Limited



Quote:
> It is not recommended to pass ADO connection objects between MTS
components.
> The way to do it is passing the connectionstring and reconnect every time.
> Let the connection Pooling do the dirty work. The result is the same, but
> you don't have the problems.

> Filip



> > Sorry to cross-post, but I'm really stumped for ideas...

> > Anyone seen this:

> > Error# 3001
> > Source:      ADODB.Command
> > Description: The application is using arguments that are of the wrong
> type,
> > are out of acceptable range, or are in conflict with one another.

> > It occurs in a MTS-hosted class when I try to associate a (proven)
> > connection object to a command object using the .ActiveConnection
> property.

> > I have tried the Connection object in question with
> > RECORDSET.ActiveConnection and it works perfectly.

> > Any ideas,

> > Is this MTS or ADO?

> > Thanks in advance,

> > Seb Reeve - Consultant - Sabio Limited



Mon, 10 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object

Quote:
> Shame really as I wanted to centralise a Connection Factory object...

Umm, why with MTS?  Doesn't it's connection pooling capabilities fit the
bill?

--

Later,
Tony Fountain, MCP
===================================================
Please do not email me directly, my wife already clutters up my inbox
===================================================



Mon, 10 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object
I'm also getting a 3001 myself, but I have nothing to do with MTS.  But
I am in a relatively complex setup with numerous COM DLLs (written in
VB) where I'm opening a Connection in one DLL, and passing it along to
another in which I'm assigning the connection to a
Command.ActiveConnection.  That's where I get the 3001 error.  I hope
you're not telling me I have to use separate connections for every
command.

One twist is that there's a transaction open on the connection when I
create the command object.

Any advice you can give me -- thanks in advance very very much!

Andrew Wolfe



Quote:
> It is not recommended to pass ADO connection objects between MTS
components.
> The way to do it is passing the connectionstring and reconnect every
time.
> Let the connection Pooling do the dirty work. The result is the same,
but
> you don't have the problems.

> Filip



> > Sorry to cross-post, but I'm really stumped for ideas...

> > Anyone seen this:

> > Error# 3001
> > Source:      ADODB.Command
> > Description: The application is using arguments that are of the
wrong
> type,
> > are out of acceptable range, or are in conflict with one another.

> > It occurs in a MTS-hosted class when I try to associate a (proven)
> > connection object to a command object using the .ActiveConnection
> property.

> > I have tried the Connection object in question with
> > RECORDSET.ActiveConnection and it works perfectly.

> > Any ideas,

> > Is this MTS or ADO?

> > Thanks in advance,

> > Seb Reeve - Consultant - Sabio Limited

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Tue, 11 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object

Portability really. I just thought it would be nice to only have to
recompile one small object to allow access to a different SQL server.

Cheers,

Seb


Quote:
> > Shame really as I wanted to centralise a Connection Factory object...

> Umm, why with MTS?  Doesn't it's connection pooling capabilities fit the
> bill?

> --

> Later,
> Tony Fountain, MCP
> ===================================================
> Please do not email me directly, my wife already clutters up my inbox
> ===================================================



Tue, 11 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object
Advice:

Don't pass Connection objects between COM/ActiveX objects.
It doesn't work.

You will have to make a connection within every object that needs one.

Seb

Quote:

> I'm also getting a 3001 myself, but I have nothing to do with MTS.  But
> I am in a relatively complex setup with numerous COM DLLs (written in
> VB) where I'm opening a Connection in one DLL, and passing it along to
> another in which I'm assigning the connection to a
> Command.ActiveConnection.  That's where I get the 3001 error.  I hope
> you're not telling me I have to use separate connections for every
> command.

> One twist is that there's a transaction open on the connection when I
> create the command object.

> Any advice you can give me -- thanks in advance very very much!

> Andrew Wolfe



> > It is not recommended to pass ADO connection objects between MTS
> components.
> > The way to do it is passing the connectionstring and reconnect every
> time.
> > Let the connection Pooling do the dirty work. The result is the same,
> but
> > you don't have the problems.

> > Filip



> > > Sorry to cross-post, but I'm really stumped for ideas...

> > > Anyone seen this:

> > > Error# 3001
> > > Source:      ADODB.Command
> > > Description: The application is using arguments that are of the
> wrong
> > type,
> > > are out of acceptable range, or are in conflict with one another.

> > > It occurs in a MTS-hosted class when I try to associate a (proven)
> > > connection object to a command object using the .ActiveConnection
> > property.

> > > I have tried the Connection object in question with
> > > RECORDSET.ActiveConnection and it works perfectly.

> > > Any ideas,

> > > Is this MTS or ADO?

> > > Thanks in advance,

> > > Seb Reeve - Consultant - Sabio Limited

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Tue, 11 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object
We actually have software that passes Connections that has been working
for over a year now.  We use a broker DLL that holds the connection and
it gives access to the connection to 8 other COM DLLs that work with
various parts of the database.  The hitch came when we upgraded to ADO
2.1 -- and tried using Commands.

These other DLLs may not use ADODB.Command objects at all.  Perhaps
you'll tell me that is why they have worked correctly.  Is that the
case?

When you say not to pass the connection objects, are you saying that
based on experience, or documentation?  Microsoft's knowledge base on
ADO is so small, it's hard to tell what they're promising and what
they're not.  If you've got references to actual documentation, please
send them!  I'm starved for real info.

Thanks for pitching in,

Andrew Wolfe



Quote:
> Advice:

> Don't pass Connection objects between COM/ActiveX objects.
> It doesn't work.

> You will have to make a connection within every object that needs one.

> Seb




Quote:
> > I'm also getting a 3001 myself, but I have nothing to do with MTS.
But
> > I am in a relatively complex setup with numerous COM DLLs (written
in
> > VB) where I'm opening a Connection in one DLL, and passing it along
to
> > another in which I'm assigning the connection to a
> > Command.ActiveConnection.  That's where I get the 3001 error.  I
hope
> > you're not telling me I have to use separate connections for every
> > command.

> > One twist is that there's a transaction open on the connection when
I
> > create the command object.

> > Any advice you can give me -- thanks in advance very very much!

> > Andrew Wolfe



> > > It is not recommended to pass ADO connection objects between MTS
> > components.
> > > The way to do it is passing the connectionstring and reconnect
every
> > time.
> > > Let the connection Pooling do the dirty work. The result is the
same,
> > but
> > > you don't have the problems.

> > > Filip



> > > > Sorry to cross-post, but I'm really stumped for ideas...

> > > > Anyone seen this:

> > > > Error# 3001
> > > > Source:      ADODB.Command
> > > > Description: The application is using arguments that are of the
> > wrong
> > > type,
> > > > are out of acceptable range, or are in conflict with one
another.

> > > > It occurs in a MTS-hosted class when I try to associate a
(proven)
> > > > connection object to a command object using the
.ActiveConnection
> > > property.

> > > > I have tried the Connection object in question with
> > > > RECORDSET.ActiveConnection and it works perfectly.

> > > > Any ideas,

> > > > Is this MTS or ADO?

> > > > Thanks in advance,

> > > > Seb Reeve - Consultant - Sabio Limited

> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Tue, 11 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object

Unfortunately, this is experience-based.

I haven't even looked in the KB etc. for this topic.

Seb



Quote:
> We actually have software that passes Connections that has been working
> for over a year now.  We use a broker DLL that holds the connection and
> it gives access to the connection to 8 other COM DLLs that work with
> various parts of the database.  The hitch came when we upgraded to ADO
> 2.1 -- and tried using Commands.

> These other DLLs may not use ADODB.Command objects at all.  Perhaps
> you'll tell me that is why they have worked correctly.  Is that the
> case?

> When you say not to pass the connection objects, are you saying that
> based on experience, or documentation?  Microsoft's knowledge base on
> ADO is so small, it's hard to tell what they're promising and what
> they're not.  If you've got references to actual documentation, please
> send them!  I'm starved for real info.

> Thanks for pitching in,

> Andrew Wolfe



> > Advice:

> > Don't pass Connection objects between COM/ActiveX objects.
> > It doesn't work.

> > You will have to make a connection within every object that needs one.

> > Seb



> > > I'm also getting a 3001 myself, but I have nothing to do with MTS.
> But
> > > I am in a relatively complex setup with numerous COM DLLs (written
> in
> > > VB) where I'm opening a Connection in one DLL, and passing it along
> to
> > > another in which I'm assigning the connection to a
> > > Command.ActiveConnection.  That's where I get the 3001 error.  I
> hope
> > > you're not telling me I have to use separate connections for every
> > > command.

> > > One twist is that there's a transaction open on the connection when
> I
> > > create the command object.

> > > Any advice you can give me -- thanks in advance very very much!

> > > Andrew Wolfe



> > > > It is not recommended to pass ADO connection objects between MTS
> > > components.
> > > > The way to do it is passing the connectionstring and reconnect
> every
> > > time.
> > > > Let the connection Pooling do the dirty work. The result is the
> same,
> > > but
> > > > you don't have the problems.

> > > > Filip



> > > > > Sorry to cross-post, but I'm really stumped for ideas...

> > > > > Anyone seen this:

> > > > > Error# 3001
> > > > > Source:      ADODB.Command
> > > > > Description: The application is using arguments that are of the
> > > wrong
> > > > type,
> > > > > are out of acceptable range, or are in conflict with one
> another.

> > > > > It occurs in a MTS-hosted class when I try to associate a
> (proven)
> > > > > connection object to a command object using the
> .ActiveConnection
> > > > property.

> > > > > I have tried the Connection object in question with
> > > > > RECORDSET.ActiveConnection and it works perfectly.

> > > > > Any ideas,

> > > > > Is this MTS or ADO?

> > > > > Thanks in advance,

> > > > > Seb Reeve - Consultant - Sabio Limited

> > > Sent via Deja.com http://www.deja.com/
> > > Share what you know. Learn what you don't.

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Fri, 14 Dec 2001 03:00:00 GMT  
 ADODB.Command Connection Error in MTS object
We had the same problem with ADO 2.1 Command Objects. We HAVE to pass the
Connection object as we're using Sybase 11 which does not have MTS automatic
transaction processing yet (D'Oh) and so we had to provide the transaction
processing ourselves. We got around it by using ADO.Recordset objects to
return recordsets and the Connection object itself to execute Insert/Update
SQL. If you rely on Connection pooling and recreate the the connection every
time you'll most likely commit you're transactions every time to, which is
useless. At least that's the case with Sybase.

We've been using Delphi for our development. Let me know if you want some
code.

Regards
Mike Skillicorn

Quote:

>Unfortunately, this is experience-based.

>I haven't even looked in the KB etc. for this topic.

>Seb



>> We actually have software that passes Connections that has been working
>> for over a year now.  We use a broker DLL that holds the connection and
>> it gives access to the connection to 8 other COM DLLs that work with
>> various parts of the database.  The hitch came when we upgraded to ADO
>> 2.1 -- and tried using Commands.

>> These other DLLs may not use ADODB.Command objects at all.  Perhaps
>> you'll tell me that is why they have worked correctly.  Is that the
>> case?

>> When you say not to pass the connection objects, are you saying that
>> based on experience, or documentation?  Microsoft's knowledge base on
>> ADO is so small, it's hard to tell what they're promising and what
>> they're not.  If you've got references to actual documentation, please
>> send them!  I'm starved for real info.

>> Thanks for pitching in,

>> Andrew Wolfe



>> > Advice:

>> > Don't pass Connection objects between COM/ActiveX objects.
>> > It doesn't work.

>> > You will have to make a connection within every object that needs one.

>> > Seb



>> > > I'm also getting a 3001 myself, but I have nothing to do with MTS.
>> But
>> > > I am in a relatively complex setup with numerous COM DLLs (written
>> in
>> > > VB) where I'm opening a Connection in one DLL, and passing it along
>> to
>> > > another in which I'm assigning the connection to a
>> > > Command.ActiveConnection.  That's where I get the 3001 error.  I
>> hope
>> > > you're not telling me I have to use separate connections for every
>> > > command.

>> > > One twist is that there's a transaction open on the connection when
>> I
>> > > create the command object.

>> > > Any advice you can give me -- thanks in advance very very much!

>> > > Andrew Wolfe



>> > > > It is not recommended to pass ADO connection objects between MTS
>> > > components.
>> > > > The way to do it is passing the connectionstring and reconnect
>> every
>> > > time.
>> > > > Let the connection Pooling do the dirty work. The result is the
>> same,
>> > > but
>> > > > you don't have the problems.

>> > > > Filip



>> > > > > Sorry to cross-post, but I'm really stumped for ideas...

>> > > > > Anyone seen this:

>> > > > > Error# 3001
>> > > > > Source:      ADODB.Command
>> > > > > Description: The application is using arguments that are of the
>> > > wrong
>> > > > type,
>> > > > > are out of acceptable range, or are in conflict with one
>> another.

>> > > > > It occurs in a MTS-hosted class when I try to associate a
>> (proven)
>> > > > > connection object to a command object using the
>> .ActiveConnection
>> > > > property.

>> > > > > I have tried the Connection object in question with
>> > > > > RECORDSET.ActiveConnection and it works perfectly.

>> > > > > Any ideas,

>> > > > > Is this MTS or ADO?

>> > > > > Thanks in advance,

>> > > > > Seb Reeve - Consultant - Sabio Limited

>> > > Sent via Deja.com http://www.deja.com/
>> > > Share what you know. Learn what you don't.

>> Sent via Deja.com http://www.deja.com/
>> Share what you know. Learn what you don't.



Fri, 14 Dec 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. ADODB.Command Connection Error in MTS object

2. Problem sending ADODB.Command object across MTS packages !!!

3. Marshalled ADODB.Connection object causes error

4. Main program clogs when adodb.connection object can't make connection

5. Sending command to a FoxPro database using ADODB.Command Object

6. Please Help - Error ADODB.Connection Error

7. return the result text from a VB ADODB.Connection.Execute command

8. Asyncronous adodb connection/command with events

9. ADODB Connection Object using transactions

10. Connecting to an Access file with an ADODB connection object

11. Can ADODB.Connection object be passed between layers?

12. Question about ADODB.Connection object...

 

 
Powered by phpBB® Forum Software