CustomCommandBuilder Class

Custom Command builder base class for SQL Server, ODBC and OLE DB to avoid primary key problems with built-in ones derived (transposed into VB.NET) from https://www.cogin.com/articles/CustomCommandBuilder.php Copyright by Dejan_Grujic 2004. http://www.cogin.com

Inheritance Hierarchy

Namespace: DBaddinAssembly: DBaddin in (DBaddin.dll)

Syntax

public class CustomCommandBuilder

The CustomCommandBuilder type exposes the following members.

Constructors

ClassSummary
public constructorCustomCommandBuilder(DataTable, DataColumn[], Boolean)

Methods

NameSummary
protected methodAutoincrementKeyColumns()
get auto increment columns
public methodDeleteCommand()
Creates Delete command
public methodInsertCommand()
Creates Insert command with support for Auto-increment (Identity) fields
protected methodTableName()
build correct quoted table name from the dataTables TableName
public methodUpdateCommand()
Creates Update command

Fields

NameDescription
protected fieldallColumns
array of all column information (DataColumn) in the data table
protected fielddataTable
the data table to get all the schema information from
protected fieldpreventAutoInc
Used to avoid creation of auto increment code (avoids SELECT SCOPE_IDENTITY())