Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2009
    Posts
    6

    Question Unanswered: Type Mismatch Error on NEW MACHINE

    I couldnt' find anything on the net soo here's my problem.

    We have a vba access runtime application and this application was installed on a computer that was recently formatted and then was installed with Windows XP SP3 edition. After I install the runtime application the user is unable to insert/update anything to the database. I am sure it's able to reach the database since he's able to run searches.

    The error that comes up every single time user clicks on the "insert" button or "update" button is: "Type Mismatch" error. Which I assume has an error number of 13. This same application is working perfectly fine on all the other machines with windows xp or with windows 2000. Even on a machine that has XP SP2 and XP SP3. Moreover, in one of the searches that brings results back to the listbox. One of the columns always says "Binary" even though it should have some sort of number like: 22-33-23-65. The reports that we generate also is showing bunch of "Empty Boxes" and weird characters instead of the number I mentioned above. I did check the regional settings on the user's machine and they do seem fine. Data coming back is in English.

    If anyone at all can suggest me ANYTHING that I can try. Please tell me. Thanks.
    Last edited by nmoudgil; 03-02-09 at 12:20.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Could it be office service packs missing? Check the versions of Access on machines that run it ok and the one that is failing.

    Could also be a missing library reference too, compare them.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Feb 2009
    Posts
    6
    I haven't checked what you suggested. I will once I go back to work. But I was assuming that was the whole reason that Access Runtime Application comes handy that we don't need to worry about what client computer has or does not have. Because all the files that the application needs are already packaged along with the application anyways. So I assumed it had to be related to some Windows XP missing dll's or something along those lines?

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    all the files that the application needs are already packaged along with the application anyways.
    Not always. I believe it has the standard references, but if you go adding libraries I'm not sure those extra references will be there in runtime. I hate runtime, because you can't step through code with it to isolate problems like this.

    So I assumed it had to be related to some Windows XP missing dll's or something along those lines?
    I was thinking more along the lines of office dlls, but it could be XP as well I guess.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Feb 2009
    Posts
    6
    Startrekker,

    I did what you suggested. But unfortunately all the dll's and refrences were fine and vba has access to all the dlls that are refered in the refrences. So what i did I actually went to debug it. And I notice that the error occures when a recordset is being opened. When the rst is opened (below) there is no value that comes back and because no value is coming back the case 1 statement fails and throws Type Mismatch error. The problem is why is the value not being able to be selected? In all the other machines it works fine. I am using MYSQL ODBC 3.51 driver. Before I tried using 5 but that didn't even open the Access db. But the build that I am using is 27 I don't know if that could be the issue or if it's even related to MYSQL driver. Here is the code:

    Select Case Me.dept
    Case "C", "E"
    strSql = "CALL INSERT_JC(" & lngJobId & "," & lngCurrEmpId & "," & lngcostitem & "," & dblUnits & "," & _
    "'" & strdesc & "','" & dteDate & "',@INSERTCompleted, @lastrec)"
    Case "G"
    strSql = "CALL INSERT_UJC(" & lngJobId & "," & lngCurrEmpId & "," & lngcostitem & "," & dblUnits & "," & _
    "'" & strdesc & "','" & dteDate & "',@INSERTCompleted, @lastrec)"
    ' Case "P"
    ' strSql = "CALL INSERT_USJC(" & lngJobId & "," & lngCurrEmpId & "," & lngcostitem & "," & dblUnits & "," & _
    ' "'" & strDesc & "','" & dteDate & "',@INSERTCompleted, @lastrec)"
    End Select

    Dim comm As ADODB.Command
    Set comm = New ADODB.Command

    'Set myconn = SetMyConn
    myconn.Execute "START TRANSACTION;"

    comm.ActiveConnection = myconn

    'Debug.Print strSql
    comm.CommandText = strSql
    comm.Execute

    Set comm = Nothing

    Dim rst As ADODB.Recordset
    Set rst = New ADODB.Recordset

    rst.Open "SELECT @INSERTCompleted AS STAT, @lastrec AS LASTREC;",myconn, adOpenForwardOnly, adLockReadOnly, adCmdText
    If Not rst.EOF Or Not rst.BOF Then
    blnCompleted = rst!STAT
    Select Case blnCompleted
    Case 1
    myconn.Execute "COMMIT;"

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Have you tried opening the resultant SQL on the failing machine manually? Perhaps the solution will present itself that way?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Feb 2009
    Posts
    6
    By manually you mean installing a MySQL Broswer on the machine and running those sqls?

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No, I meant by creating a query in Access of the resulting SQL statement, saving it and trying to open it.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Feb 2009
    Posts
    6

    Smile

    Okay. So this issue is resolved by downgrading the version of MySQL Driver to 3.51.22.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •