Unsupported data type on parameter binding 0

  • OK so here goes,

    First off I am in no way a programmer or a SQL guru. I have been working on a DTS package that my company obtained from a consultant quite a few years ago. This dts package basically checks a custom table and based on certain criteria creates a text file within one of 3 folders. This is our Microsoft Dynamics / Gulfstream Barcode Gateway solution for printing Barcode labels. The 3 folders are monitored by Label Matrix which in turn grabs the text file and prints it to a specified thermal barcode printer.

    I have migrated the DTS over to another server (test environment). I am executing the package to step through the errors and I have fixed all except for this last issue in which I am going to have to go with no impact no idea. I am hoping that someone will be able to take a look at this script and tell me that I have some coding that isn't supported in SSIS and possible what to replace it with. I am however just guessing here as SQL and programming are not a major part of my day job.

    This is what I get in the details when executing the package through SQL Management Studio

    Error: Executing the query

    "SELECT SolOrderID + PalletNum AS PalletID, ProdDescr, InventoryID, Quantity, ProductionLineNbr, RTRIM(LotNbr) AS LotNbr, CONVERT(varchar(10), Crtd_DateTime, 101) AS Crtd_DateTime, CONVERT(varchar(10), Crtd_Time, 108) AS Crtd_Time

    FROM xSAPrintLabels

    WHERE (SolOrderID = ?) AND (Printed = 'N') AND (InventoryID NOT LIKE '437%')

    ORDER BY PalletNum"

    failed with the following error: "Unsupported data type on parameter binding 0.". Possible failure reasons: Problems with query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

  • Check this discussion.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • It appears that the variable that you are passing into your parameter is of a different datatype than your SolOrderID. I would check both the variable and the SolOrderID to make sure they are of the same datatype.

    It could also be that your SolOrderID is a string and the value will need single quotes around it in order to evaluate properly. My suggestion then would be to put the entire SQL statement into a variable. Evaluate and then test this to make sure it grabs the appropriate data that you want. Then change your access mode within your Source DB component to use the variable.

  • Success

    So after reading your responses I played with the package some more. I changed the datatype to DBNULL and this allowed the package to validate. I have setup a schedule on this job and it is working ... sorta LOL. The outcome is differrent than the original in that the original used to check for an existing file and if it found one would quit at that step. Now it checks for the file and if the file isn't there then it fails, if the file is there then it succeeds, however it overwrites the existing file. Which is not exactly working as intended.

    I believe this new problem is something other than the topic of this post.

    Thanks for the responses and sorry that it took me awhile to get back.

Viewing 4 posts - 1 through 3 (of 3 total)

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