Mdac2.6 to Mdac2.7 causes Type Mismatch Runtime Error 13

Mdac2.6 to Mdac2.7 causes Type Mismatch Runtime Error 13

Post by Gerry Viato » Fri, 15 Feb 2002 01:22:49



Hi all,

When using mdac2.6 my program works fine. When I change to Mdac2.7 I get the
following error

Runtime error 13
     Type Mismatch

Then points and highlights in yellow to this line of code:
                               Set inparam1 =
.CreateParameter("usernamelog", adVarChar, adParamInput, 20, stringUserName)

Thanks for any help?

*********block of code that contains that line of code
   Dim inparam1 As Parameter
   Dim Inparam2 As Parameter
   Dim Inparam3 As Parameter
   Dim outparam As Parameter

  '''''''The following 5 variables are declared in Module
   Public StringUserName As String
   Public StringIP As String
   Public StringCompName As String
   Public StringServer As Variant
   Public Stringoutput As Integer
.........
.........
If rsLogin.Fields("Access") = "full" Then
                         StringServer = Trim(txtserver)
                         StringUserName = Trim(txtUserName)

              Set cmdLogin = New ADODB.Command
              cmdLogin.CommandText = "adduserlog"
              cmdLogin.CommandType = adCmdStoredProc
             With cmdLogin
                .ActiveConnection = CnLogin
                Set inparam1 = .CreateParameter("usernamelog", adVarChar,
adParamInput, 20, StringUserName)
                               .Parameters.Append inparam1
                Set Inparam2 = .CreateParameter("machineaddress", adVarChar,
adParamInput, 40, StringIP)
                               .Parameters.Append Inparam2
                Set Inparam3 = .CreateParameter("machinename", adVarChar,
adParamInput, 40, StringCompName)
                               .Parameters.Append Inparam3
                Set outparam = .CreateParameter("output", adInteger,
adParamOutput)
                               .Parameters.Append outparam
                .Execute

              End With
             Stringoutput = cmdLogin("output")
.....
.....

Thanks
Gerry

 
 
 

Mdac2.6 to Mdac2.7 causes Type Mismatch Runtime Error 13

Post by Gerry Viato » Fri, 15 Feb 2002 01:44:53


Hi all,

Fixed the problem!!!

When declaring the parameter i changed it to this everywhere in my code and
it fixed the problem

Dim inparam1 As ADODB.Parameter

Can anyone tell me why the change?

Thanks again
Gerry


Quote:> Hi all,

> When using mdac2.6 my program works fine. When I change to Mdac2.7 I get
the
> following error

> Runtime error 13
>      Type Mismatch

> Then points and highlights in yellow to this line of code:
>                                Set inparam1 =
> .CreateParameter("usernamelog", adVarChar, adParamInput, 20,
stringUserName)

> Thanks for any help?

> *********block of code that contains that line of code
>    Dim inparam1 As Parameter
>    Dim Inparam2 As Parameter
>    Dim Inparam3 As Parameter
>    Dim outparam As Parameter

>   '''''''The following 5 variables are declared in Module
>    Public StringUserName As String
>    Public StringIP As String
>    Public StringCompName As String
>    Public StringServer As Variant
>    Public Stringoutput As Integer
> .........
> .........
> If rsLogin.Fields("Access") = "full" Then
>                          StringServer = Trim(txtserver)
>                          StringUserName = Trim(txtUserName)

>               Set cmdLogin = New ADODB.Command
>               cmdLogin.CommandText = "adduserlog"
>               cmdLogin.CommandType = adCmdStoredProc
>              With cmdLogin
>                 .ActiveConnection = CnLogin
>                 Set inparam1 = .CreateParameter("usernamelog", adVarChar,
> adParamInput, 20, StringUserName)
>                                .Parameters.Append inparam1
>                 Set Inparam2 = .CreateParameter("machineaddress",
adVarChar,
> adParamInput, 40, StringIP)
>                                .Parameters.Append Inparam2
>                 Set Inparam3 = .CreateParameter("machinename", adVarChar,
> adParamInput, 40, StringCompName)
>                                .Parameters.Append Inparam3
>                 Set outparam = .CreateParameter("output", adInteger,
> adParamOutput)
>                                .Parameters.Append outparam
>                 .Execute

>               End With
>              Stringoutput = cmdLogin("output")
> .....
> .....

> Thanks
> Gerry


 
 
 

Mdac2.6 to Mdac2.7 causes Type Mismatch Runtime Error 13

Post by Grinde » Fri, 15 Feb 2002 01:50:12



Quote:> Hi all,

> Fixed the problem!!!

> When declaring the parameter i changed it to this everywhere
in my code and
> it fixed the problem

> Dim inparam1 As ADODB.Parameter

> Can anyone tell me why the change?

Sorry -- coming in a bit late.  Do you have multiple references
to ADO in your project references?  I'm not sure if it's
possible to get ADO 2.6 and ADO 2.7 both in there, but I know
you can get this type of problem if ADO and DAO, for instance
are both referenced.
 
 
 

Mdac2.6 to Mdac2.7 causes Type Mismatch Runtime Error 13

Post by Gerry Viato » Fri, 15 Feb 2002 22:35:51


No,

Now just 2.7.  It's working fine now since I added "ADODB"

Thanks
Gerry




> > Hi all,

> > Fixed the problem!!!

> > When declaring the parameter i changed it to this everywhere
> in my code and
> > it fixed the problem

> > Dim inparam1 As ADODB.Parameter

> > Can anyone tell me why the change?

> Sorry -- coming in a bit late.  Do you have multiple references
> to ADO in your project references?  I'm not sure if it's
> possible to get ADO 2.6 and ADO 2.7 both in there, but I know
> you can get this type of problem if ADO and DAO, for instance
> are both referenced.

 
 
 

1. RUNTIME ERROR 13: TYPE MISMATCH

I created a data environment object.  The program works great on the design
machine but on other machines I get a "type mismatch" error.  I have
narrowed down the problem to wherever I use any code to access the data
environment.  Please help.

Damien

2. Access Pop Ups

3. Type Mismatch Runtime Error 13???

4. evaluation copy of IBM IFMX Client SDK needs serial number and key?????

5. "Runtime Error 13 Data Type mismatch"

6. HATE YOUR JOB ?

7. Build when #importing MDAC2.7 fails when run on system with MDAC2.5 when only us

8. Get value from listbox

9. Error 13: Type Mismatch error

10. Run-time error '13': Type mismatch

11. Error 13: type mismatch with getrows method??

12. Help!!! Please, Type Mismatch error 13