Collection Contents 上一页 下一页 PDF

UltraLite.NET 用户指南

命名空间 iAnywhere.UltraLite

类 PreparedStatement


表示具有或不具有 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

Collection Contents 上一页 下一页 PDF