Re: Error when trying to save...

  •  09-21-2006, 6:01 AM

    Re: Error when trying to save...

    Hi
     
    Adam is right about this in that its not the editor causing the problem, its the way you are creating the stored proc parameters.
     
    You are using   .Parameters.AddWithValue("@Description", sDesc)
     
    This will try to determine the type and length from the string being passed to it and not the database parameters. You need to explicitly create your parameters
     
        .Parameters.Add("@Description", SqlDbType.VarChar, 8000).Value = sDesc
     
    This also has the advantage that if you forget to limit the sDesc variable to 8000 it wont complain it just truncates the value, plus it will convert the string to the correct type ie. non unicode 8000 length.
     
    Hope this helps
    Andy
View Complete Thread