locked
DbType for varbinary(max) RRS feed

  • Question

  • I am using a Entity Framework to call a stored procedure to save a record to sql server database table. One of the column is varbinary(max) type with data longer than 8000 bytes. How to I specify the type? The document says DbType.Binary is only for data less than 8000 byte.

    parameter =

    new EntityParameter("MyColumn", DbType

    .Binary);

    parameter.Value = data;

    cmd.Parameters.Add(parameter);

    where cmd is a DbCommand

    


    Roy
    Tuesday, September 20, 2011 2:35 PM

Answers

  • Hi Roy.

    Here is a link that might help you:

    http://www.pcreview.co.uk/forums/dbtype-binary-and-limit-0-8000-bytes-t2876960.html

     

    Regards

    • Marked as answer by Alan_chen Monday, October 3, 2011 7:28 AM
    Tuesday, September 20, 2011 7:23 PM

All replies

  • Hi Roy.

    Here is a link that might help you:

    http://www.pcreview.co.uk/forums/dbtype-binary-and-limit-0-8000-bytes-t2876960.html

     

    Regards

    • Marked as answer by Alan_chen Monday, October 3, 2011 7:28 AM
    Tuesday, September 20, 2011 7:23 PM
  • Hi,

    I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know. I will be more than happy to be of assistance.

    Have a nice day. 


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, September 26, 2011 3:15 AM