共用方式為


QueryTimeout Property

未來的 Microsoft SQL Server 版本將移除這項功能。請避免在新的開發工作中使用這項功能,並規劃修改目前使用這項功能的應用程式。

The QueryTimeout property specifies the number of seconds elapsed before a time-out error is reported on an attempted statement execution.

語法

object.QueryTimeout [= value]

Parts

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

  • value
    A long integer that specifies the number of seconds

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetQueryTimeout(LPLONG pRetVal);
HRESULT SetQueryTimeout(LONG NewValue);

備註

To specify that a query cannot time out, use -1 (the default) or 0.