Type Mismatch Runtime Error 13???

Type Mismatch Runtime Error 13???

Post by Kho Chye Kiat, Henr » Tue, 04 Jul 2000 04:00:00



1) Wrote a VC++ 6.0SP4 MTS, ADO Component.
2) Component inserts records into a SQL7 table:
    bstrQuery = L"INSERT INTO table (col1, col2, col3, col4, col5, col6)
VALUES ('value1', 'value2', 'value3', 'value4', 'value5', 'value6')";
    pConnection->Execute(bstrQuery, NULL, adExecuteNoRecords);
3) Used VB6SP4 to write a simple client to test the MTS component.
4) All records are added perfectly into the table.
5) However, at the end of the component function call, a Runtime Error 13:
Type Mismatch error occurs, and VB crashes with an exception error.

WHAT'S WRONG!! Please help!!

Thanks in advance,
Henry Kho

 
 
 

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

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

2. Transform() question

3. RUNTIME ERROR 13: TYPE MISMATCH

4. ORACLE APPS. ENGINEER HELP!!!!

5. "Runtime Error 13 Data Type mismatch"

6. Trying to insert text datatype data into html via asp, need help please...

7. Error 13: Type Mismatch error

8. xp_sendmail

9. Type Mismatch Error 13

10. run time error type mismatch 13

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

12. Excel early binding, Error 13 - Type mismatch?

13. Type MisMatch Error '13'