Udostępnij za pośrednictwem


Zapis (aparat bazy danych)

Write writes out a binary representation of SqlHierarchyId to the passed-in BinaryWriter.Write cannot be called by using Transact-SQL.Za pomocą CAST lub zamiast niej CONVERT.

void Write( BinaryWriter w ) 

Argumenty

  • w
    A BinaryWriter obiekt, do którego reprezentacja binarna hierarchyid węzeł zostanie zapisany.

Zwracane typy

**Zwracany typ CLR:**void

Remarks

Write is used internally by SQL Server when it is necessary, such as when loading data from a hierarchyid column.Write is also called internally when a conversion is done between hierarchyid and varbinary.

Przykłady

MemoryStream stream = new MemoryStream();
BinaryWriter bw = new BinaryWriter(stream);
hid.Write(bw);
byte[] encoding = stream.ToArray();