Results 1 to 2 of 2

Thread: [RESOLVED] data type Mismatch in criteria expression

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] data type Mismatch in criteria expression

    What the cause of this error message?

    After debug, it point me at this line

    InfoRS4.Open "Select * from [Prestasi hasil] where Plot = " & getID, conn, adOpenDynamic, adLockOptimistic
    Attached Images Attached Images  

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: data type Mismatch in criteria expression

    Just like in VB code, the error "Data type mismatch" in SQL statements means that you are trying to put a value of one data type (eg: String/Date/Integer/...) into something which has a different data type - but the value cannot fit into the other data type.

    Check what data type the "Plot" field is in that table, and then make sure that you have specified the value appropriately - as shown in the article How do I use values (numbers, strings, dates) in SQL statements? from our Database Development FAQs/Tutorials (at the top of this forum)

Posting Permissions

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



Click Here to Expand Forum to Full Width