Поделиться через


IsValid (Command Interface)

ms133255.note(ru-ru,SQL.90).gifПримечание.
  В следующей версии Microsoft SQL Server эта возможность будет удалена. Не используйте ее при работе над новыми приложениями и как можно быстрее измените приложения, в которых она в настоящее время используется.

The IsValid property of the Command interface indicates whether the Name and Statement properties are empty and whether the command object belongs to a collection.

Applies To:clsCubeCommand, clsDatabaseCommand, clsRoleCommand

Data Type

Boolean

Access

Read-only

Замечания

Because of the flexible nature of command objects, only the following checks are performed:

  • The Name property of the command object is not empty.
  • The Command object belongs to a Commands collection.
  • The Statement property of the command object is not empty.

Executing a command is the only way to determine whether the command functions correctly.

Пример

Use the following code to return the validity status of a command object:

'Assume a command object (dsoCmd) exists.
If dsoCmd.IsValid Then
   'Insert code to save the command.
Else
   'Return an error with one or more properties.
End If

См. также

Справочник

Command Interface
Name (Command Interface)
Statement (Command Interface)

Справка и поддержка

Получение помощи по SQL Server 2005