Windows Vista Forums

Data type mismatch in criteria expression

  1. #1


    RICK Guest

    Data type mismatch in criteria expression

    Getting "Data type mismatch in criteria expression" with the following.
    strings are obtained with request.form("strReinDistance"), etc.

    Set rsDataOfIntroduction = server.createobject("adodb.recordset")
    conn.webqry_insertDate_Source strReinDistance, strRandr, strA & "_" & strB,
    strSourceStockID

    strSourceStockID is numeric.

    What is wrong,



    Thanks



      My System SpecsSystem Spec

  2. #2


    Trey Shaffer Guest

    Re: Data type mismatch in criteria expression

    Not clear from your description exactly where the mismatch is coming, but
    you might try...

    Force the values to be what you expect them to be with Cint() or CStr()

    Something like:

    conn.webqry_insertDate_Source CStr(strReinDistance) , _

    CStr(strRandr) , _

    CStr(strA) & _

    "_" & _

    CStr(strB) , _

    Cint(strSourceStockID)

    Not sure about the formatting on that. Hope you get the idea.

    "RICK" <RICK@xxxxxx> wrote in message
    news:C638BE1C-6CC2-46A4-8173-95543125E6BB@xxxxxx

    > Getting "Data type mismatch in criteria expression" with the following.
    > strings are obtained with request.form("strReinDistance"), etc.
    >
    > Set rsDataOfIntroduction = server.createobject("adodb.recordset")
    > conn.webqry_insertDate_Source strReinDistance, strRandr, strA & "_" &
    > strB,
    > strSourceStockID
    >
    > strSourceStockID is numeric.
    >
    > What is wrong,
    >
    > Thanks
    >
    >


      My System SpecsSystem Spec

Data type mismatch in criteria expression

Similar Threads
Thread Thread Starter Forum Replies Last Post
Type Mismatch Error After Converting vbs to wsf kamyers1 VB Script 2 15 Mar 2010
Type Mismatch error on DNS capture... HELP please Microsoft VB Script 0 13 Nov 2009
Type mismatch: FormatNumber Larry VB Script 5 07 Nov 2008
Date Type mismatch in criteria expression RICK VB Script 0 02 Oct 2008
Data type mismatch in criteria expression (with Request.form) RICK VB Script 0 07 Aug 2008