获取自动生成的、执行数据库插入操作所需的 ULCommand 对象。
Visual Basic Public Function GetInsertCommand( _ ByVal useColumnsForParameterNames As Boolean _ ) As ULCommand
C# public ULCommand GetInsertCommand( bool useColumnsForParameterNames );
useColumnsForParameterNames 如果为 true,则在可能的情况下生成与列名匹配的参数名。如果为 false,则生成 @p1、@p2 等等。
自动生成的、执行插入操作所需的 ULCommand 对象。
首先生成 SQL 语句后,如果应用程序以任何方式对 ULDataAdapter.SelectCommand 进行了更改,则它必须显式调用 DbCommandBuilder.RefreshSchema。否则,GetInsertCommand 方法会继续使用来自上一条语句的信息,而该信息可能是不正确的。当应用程序调用 DbDataAdapter.Update(System.Data.DataSet) 或 GetInsertCommand 方法时,会首先生成 SQL 语句。
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |