QuickObjects.ObjectBase Send comments on this topic.
Insert Method
See Also 
Akal.QuickObjects.ObjectBase Namespace > BaseBusinessObject Class : Insert Method

Insert

Runs an Insert command with the fields marked with UseInSave as true. This method expects that all the primary key values have been specified if they are not marked AutoGenerated.

If the underlying database is Oracle then this method will also load back values of the AutoGenerated PrimaryKeyFields for the inserted record.

However, if the underlying database is SQL Server the value of the identity field is loaded automatically after insertion.

NOTE: Only one AutoGenerated primary key field is supported per business object when the underlying database is SQL Server 2000 or SQL Server 2005. If you have more than one AutoGenerated primary key fields, the insert will still work but the IDENTITY and/or other primary key field values will not be loaded back automatically.

Business object must have at least one primary key field defined for this operation to work.

NOTE: Starting version 3.x this method will retain any inserted values for a later sync/save process if the ObjectState property is set to Disconnected. If the ObjectState property is set to Connected then the Insert command is sent to the database immediatly.

Returns:
Type
System.Boolean

Overload List

OverloadDescription
Insert()Insert

Runs an Insert command with the fields marked with UseInSave as true. This method expects that all the primary key values have been specified if they are not marked AutoGenerated.

If the underlying database is Oracle then this method will also load back values of the AutoGenerated PrimaryKeyFields for the inserted record.

However, if the underlying database is SQL Server the value of the identity field is loaded automatically after insertion.

NOTE: Only one AutoGenerated primary key field is supported per business object when the underlying database is SQL Server 2000 or SQL Server 2005. If you have more than one AutoGenerated primary key fields, the insert will still work but the IDENTITY and/or other primary key field values will not be loaded back automatically.

Business object must have at least one primary key field defined for this operation to work.

NOTE: Starting version 3.x this method will retain any inserted values for a later sync/save process if the ObjectState property is set to Disconnected. If the ObjectState property is set to Connected then the Insert command is sent to the database immediatly.

Returns:
Type
System.Boolean
 

Insert(DataRow)Insert

Runs an Insert command with the fields marked with UseInSave as true. This method expects that all the primary key values have been specified if they are not marked AutoGenerated.

If the underlying database is Oracle then this method will also load back values of the AutoGenerated PrimaryKeyFields for the inserted record.

However, if the underlying database is SQL Server the value of the identity field is loaded automatically after insertion.

NOTE: Only one AutoGenerated primary key field is supported per business object when the underlying database is SQL Server 2000 or SQL Server 2005. If you have more than one AutoGenerated primary key fields, the insert will still work but the IDENTITY and/or other primary key field values will not be loaded back automatically.

Business object must have at least one primary key field defined for this operation to work.

NOTE: Starting version 3.x this method will retain any inserted values for a later sync/save process if the ObjectState property is set to Disconnected. If the ObjectState property is set to Connected then the Insert command is sent to the database immediatly.

Returns:
Type
System.Boolean
 

Requirements

Target Platforms: .NET Framework 1.1 or .NET Framework 2.0

See Also