• enriquezreyjoseph (9/28/2013)


    Lynn Pettis (9/28/2013)


    What are the correct data types for the following columns:

    sexID

    statusID

    firstname

    middlename

    lastname

    sexID int

    statusID int

    firstname varchar(20)

    middlename varchar(20)

    lastname varchar(20)

    that is in my table

    Okay, then based on the info above, your code is inefficient. Your parameters to both your stored procedure and the dynamic sql you are building should match the data types of the columns in your table/view.

    Also, the way you wrote your last dynamic sql you don't even need the parameters you defined, you aren't using them. The code you have written is ripe for SQL injection.