大网数据广告活动
安装更新与部署

_Streams Table

· 52CE 我爱测

The _Streams table lists embedded OLE data streams. This is a temporary table, created only when referenced by a SQL statement.

The _Streams table lists embedded OLE data streams. This is a temporary table, created only when referenced by a SQL statement.

Column Type Key Nullable
Name Text Y N
Data Binary N Y

Columns

Name

A unique key that identifies the stream. The maximum length of Name is 62 characters.

Data

The unformatted binary data.

Remarks

To copy an OLE data stream (for example, an object of the Binary data type) from a file into a database, create a record in the _Streams table and enter the name of the data stream into the Name column of this record and copy the data from the file into the Data column using MsiRecordSetStream. Use MsiViewModify to insert the new record into the table.

To read a binary data stream embedded in a database, use a SQL query to find and to fetch the record containing the binary data. Use MsiRecordReadStream to read the binary data into a buffer.

To move a binary data stream from one database to another, first export the data to a file. Use a SQL query to find the data stream in the file and use MsiRecordSetStream to copy the data from the file into Data column of _Streams table of the second database. This ensures that each database has its own copy of the binary data. You cannot move binary data from one database to another simply by fetching a record with the data from the first database and inserting it into the second database.

To delete a data stream, fetch the record and set the Data column to null before updating the record. Another method is to remove the record from the table, deleting it using either MsiViewModify or a plain SQL query. A stream should not be fetched into a record if the stream is deleted from the table.

To rename an OLE data stream, update the 'Name' column of the record.

If a hold is placed on this table using SQL (ALTER TABLE <table> HOLD) or a column is added with HOLD, the table must be released using FREE. Streams are not written until the table has been released or committed.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。