Open - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another

  • oRecordset.open strSQL, oConnection

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

     

    Any idea what might cause this?

    strSQL hold an SQL I built as follows:

    Dim strSQL

     strSQL = "select AuthorizationNumber from REPRICE_AuthNumbers where AuthorizationNumber = " + DTSSource("Authorization#")

     

  • what's the return type of DTSSource("Authorization#")??

    if this is a string or a date you need to wrap it in quotation marks like this:

    strSQL = "select AuthorizationNumber from REPRICE_AuthNumbers where AuthorizationNumber = '" + DTSSource("Authorization#") + "'"

    if this isn't the problem, I would try to execute the DTSSource("Authorization#") alone to see if this is what throws the error.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply