This topic has not yet been rated - Rate this topic

Text Property

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The Text property exposes the Transact-SQL or other script that defines the referenced Microsoft SQL Server database object.


object
.Text [=value]
object

An expression that evaluates to an object in the Applies To list

value

A string that satisfies the constraints on definition text for the referenced object

String

Read/write when using a SQL Distributed Management Objects (SQL-DMO) object to create a SQL Server database object. Read-only when a SQL-DMO object references an existing database object.

HRESULT GetText(SQLDMO_LPBSTR pRetVal);
HRESULT SetText(SQLDMO_LPCSTR NewValue);
NoteNote

SQL-DMO strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference using SysFreeString.

Constraints apply to strings used to set the Text property. For example, the Text property of a Check object contains an expression that evaluates to TRUE or FALSE. For a Trigger object, the Text property contains a Transact-SQL statement that creates a trigger when run. For more information, see documentation for the applicable SQL-DMO object.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.