type mismatch when instantiating ADODB.Command class

type mismatch when instantiating ADODB.Command class

Post by ian » Sat, 15 Feb 2003 10:01:46



Hi,

I encounter a type mismatch error when instantiating
ADODB.Command class in VB6. All other ADO objects are OK,
i.e. Connection, Recordset, Stream etc, just the one
problem with the Command object.

I'm running W2K SP3, SQL 2K, installed MDAC 2.7 SP1

Thanks

 
 
 

type mismatch when instantiating ADODB.Command class

Post by brad elliot » Sun, 16 Feb 2003 00:46:40


I may be having a similar problem using ADO from .asp -
the 'command.execute' statement gives:

Error Type:
Provider (0x80040E3D)
Type is invalid.

From what I can see of other discussion the MDAC 2.7 SP1
is the problem but no one has found a way of removing it
and in fact microsoft documentation appears to indicate it
can't removed from win2000. The 'MDAC component checker'
tells me "more than one version of MDAC matches your
computer's configuration" - "one of these version is '2.7
SP1 (WinXP)' .. Since you can't remove it I'm trying to
figure out how to tell ado to use a previous version of
MDAC. I'm guessing that either the connection object or
with the ODBC definition might allow it but haven't had
any luck .. does this sound like your situation? any idea
on how to specify version of MDAC?

brad

Quote:>-----Original Message-----
>Hi,

>I encounter a type mismatch error when instantiating
>ADODB.Command class in VB6. All other ADO objects are OK,
>i.e. Connection, Recordset, Stream etc, just the one
>problem with the Command object.

>I'm running W2K SP3, SQL 2K, installed MDAC 2.7 SP1

>Thanks
>.


 
 
 

type mismatch when instantiating ADODB.Command class

Post by Val Mazu » Tue, 18 Feb 2003 00:35:04


Ian,

How do you instantiating it? Could you post your code please?

--
Val Mazur
Microsoft MVP


Quote:> Hi,

> I encounter a type mismatch error when instantiating
> ADODB.Command class in VB6. All other ADO objects are OK,
> i.e. Connection, Recordset, Stream etc, just the one
> problem with the Command object.

> I'm running W2K SP3, SQL 2K, installed MDAC 2.7 SP1

> Thanks

 
 
 

1. Type Mismatch Executing Adodb.command

Hello!!

  I have a problem..I developed a simple app that connects to a sybase
server via ODBC.  It uses a ADODB connection, command, and recordset. I
have a reference to ActiveX Data Object 2.5
When i execute the app through VB IDE, it works fine.  I created a
setup package using Pkg and Deployment wizard.  I install it on a test
machine and i get the following error.

13, type mismatch.

I know it connects to the database.  the error occures when i execute
the adodb command statement.  here is the code

 cmd.ActiveConnection = cnn1
 cmd.CommandText = "select * from apinppdt"
 cmd.CommandType = adCmdText
 Set rs = cmd.Execute

This error only occures when i distribute the app not on my development
machine.

Thanks in Advance

Amit

Sent via Deja.com http://www.deja.com/
Before you buy.

2. FoxPro or MS Access ???

3. Return type mismatch when using MFC ODBC class with decimal type

4. connecting to novell server

5. instantiating ADO Recordset, Connection, Command classes

6. Date and SQL, using VB 6

7. ADODB Type Mismatch

8. What's wrong with my datediff usage?

9. Type Mismatch when checking command.state

10. adodb.connection, adodb.command and MTS

11. Unable to instantiate MSXML class factories