DbNetSuiteVS
ExecuteInsert Method (CmdConfig)
NamespacesDbNetLink.DataDbNetDataExecuteInsert(CommandConfig)
Inserts a record into the database using the supplied CommandConfig
Declaration Syntax
C#Visual Basic
public long ExecuteInsert(
	CommandConfig CmdConfig
)
Public Function ExecuteInsert ( _
	CmdConfig As CommandConfig _
) As Long
Parameters
CmdConfig (CommandConfig)

The parameterised insert statement/table name and parameter values

Return Value
Returns the value assigned to the auto-incrementing (where applicable) column or -1
Examples
CopyC#
DbNetData Data = new DbNetData( ConfigurationSettings.AppSettings[ "nwind" ] );
Data.Open();
CommandConfig CmdConfig = new CommandConfig("products");
// You only need to specify the table name. DbNetData will build the rest of 
// the insert statement automatically using the parameters 
CmdConfig.Params["productname"] = ProductName.Value;
CmdConfig.Params["categoryid"] = CategoryID.Value;
CmdConfig.Params["description"] = ProductName.Description;
CmdConfig.Params["discontinued"] = 0;

long ProductID = Data.ExecuteInsert(CmdConfig)
Data.Close();

Assembly: DbNetLink.DbNetSuiteVS (Module: DbNetLink.DbNetSuiteVS) Version: 0.9.3317.16858 (0.9.0.0)