Click or drag to resize
DatabaseInsert Method
Insert data into a table. This is a short cut method that creates an update query and then uses the
query('insert')
, table, set and exec methods of the query.

Namespace:  DataTables
Assembly:  DataTables (in DataTables.dll) Version: 1.6.5.0 (1.6.5.0)
Syntax
C#
public Result Insert(
	string table,
	Dictionary<string, Object> set,
	string[] pkey = null
)

Parameters

table
Type: SystemString
Table to perform the insert on
set
Type: System.Collections.GenericDictionaryString, Object
Dictionary of field names and values to set
pkey (Optional)
Type: SystemString
Primary key column names (this is an array for forwards compt, although only the first item in the array is actually used). This doesn't need to be set, but it must be if you want to use the `Result.InsertId()` method.

Return Value

Type: Result
Result instance
See Also