Read VARBINARY(MAX) from SQL Server to C#

I need to read data row from SQL Server 2008. The type of one of the columns is VARBINARY(MAX). In C# I want to use out parameter to read it (and given scenario satisfies the needs mostly).

But I need to specify the parameter variable size to fill the C# variable. Здесь я предполагаю, что 8000 достаточно ... Но кто знает:

database.AddOutParameter(command, "vbCertificate", DbType.Binary, 8000);

Итак, вопросы следующие:

  1. Каков размер MAX в number для SQL Server 2008?
  2. Можно ли использовать параметр out для этого сценарий?
7
задан abatishchev 9 February 2011 в 17:20
поделиться