Invalid Character Value for Cast Specification

  • Hi,

    I ma using DTS to move data from one table to another using global variables for selected required rows, but whne i run the package with out the input parameters it works fine but when try to execute it using global parameters and place holder it gives me following error

    "Invalid Character Value for Cast Specification"

    Also when i add the global variable it does

    allow me to change the data type from other than string it gives following error:

    "Could not convert variable param1 from type BSTR to type Int"

    Where Param1 is my variable name. Why it is not allowing me to change the datatype?

    waiting fo reply

    Kind Regards,

    Affan

  • If your data includes alpha characters (non-numeric), SQL Server will generate an error. Have you tried running a query in QA and doing and explicit cast or convert to see if the problem lies in your data?

    Michael

    Michael Weiss


    Michael Weiss

  • But the problme is that when i remove the place holder/parameter it works fine other wise it generates error.

    Also datatypes for both tables are exactly same.

    Generally when this error occurs is it due to parameter or data transformation?.

  • Just out of curiosity, are you using SQL Server 7.0 or 2000? What service pack are you running?

    Michael Weiss


    Michael Weiss

  • SQL Server 2000 Personal Edition and SP2.

    Now error has been corrected but now i am facing another problem that

    I have a server the package resides and i am exporting tables from that server to another server.

    When i run the package from EM then it runs fine But when i try to run the same package from SP it gives OLE error and says all stpes failed.

    Any idea why this is happening?

    Regards,

    Affan

  • I have found the OLE error, it was due to wrong destination server name.

    Regards,

    Affan

Viewing 6 posts - 1 through 5 (of 5 total)

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