Sql.Net Class Library Documentation

InsertQuery Class

Encapsulates a SQL INSERT statement

For a list of all members of this type, see InsertQuery Members.

System.Object
   Reeb.SqlOM.InsertQuery

public class InsertQuery

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Use InsertQuery to insert a new row into a database table. Set TableName to the table you would like to insert into and use the Terms collection to specify values to be inserted.

Example

InsertQuery query = new InsertQuery("products");
query.Terms.Add(new UpdateTerm("productId", SqlExpression.Number(999)));
query.Terms.Add(new UpdateTerm("name", SqlExpression.String("Temporary Test Product")));
query.Terms.Add(new UpdateTerm("price", SqlExpression.Number(123.45)));
query.Terms.Add(new UpdateTerm("quantaty", SqlExpression.Number(97)));
RenderInsert(query);

Requirements

Namespace: Reeb.SqlOM

Assembly: Reeb.SqlOM (in Reeb.SqlOM.dll)

See Also

InsertQuery Members | Reeb.SqlOM Namespace