表示具有或不具有 IN 参数的预编译的 SQL 语句。
' Visual Basic
Public Class PreparedStatement
// C#
public class PreparedStatement
无法直接实例化此类。预准备语句是使用 类 Connection 的 方法 PrepareStatement 创建的。然后此对象可用于多次有效地执行此语句。
在关闭一个预准备语句时,所有与该语句关联的 ResultSet 和 ResultSetSchema 对象也将被关闭。PreparedStatement 对象在被当作垃圾回收时将被关闭。但是,因为所有的 ResultSet 和 ResultSetSchema 对象都引用它们的预准备语句,所以,只有当其打开的 ResultSet 和 ResultSetSchema 对象全部都准备好垃圾回收之后,预准备语句才能当作垃圾回收。
出于资源管理原因,最好在使用完预准备语句后显式关闭这些语句。
成员 PreparedStatement
属性 HasResultSet
属性 IsOpen
属性 Plan
属性 ResultSetSchema
方法 AppendBytesParameter
方法 AppendCharsParameter
方法 Close
方法 ExecuteQuery
方法 ExecuteStatement
方法 Finalize
方法 SetBoolParameter
方法 SetBytesParameter
方法 SetDateTimeParameter
方法 SetDoubleParameter
方法 SetFloatParameter
方法 SetIntParameter
方法 SetLongParameter
方法 SetNullParameter
方法 SetShortParameter
方法 SetStringParameter
方法 SetTimeSpanParameter
方法 SetUIntParameter
方法 SetULongParameter
方法 SetUShortParameter
方法 SetUUIDParameter
SQL Anywhere Studio 9.0.2
版权所有 © 1989–2005 Sybase, Inc. 部分版权所有 © 2001–2005 iAnywhere Solutions, Inc. 保留所有权利。