This section provides
The reference manual of the ASP.NET WebPagesDatabase object describes the methods in the Database object.method | describe |
---|---|
Database.Execute( SQLstatement [ , parameters]) | Execute the SQL statement SQLstatement (with optional parameters), such as INSERT, DELETE or UPDATE, and return affected record statistics. |
Database.GetLastInsertId() | Returns the identity column of the most recently inserted row. |
Database.Open( filename ) Database.Open( connectionStringName ) | Use the connection string in the Web.config file to open the specified database file or specified database. |
Database.OpenConnectionString( connectionString ) | Open a database using a connection string. (The difference from Database.Open is that Database.Open uses the name of the connection string, and the value of the connection string is configured elsewhere.) |
Database.Query( SQLstatement[, parameters] ) | Use the SQL statement SQLstatement (with optional parameters) to query the database and return a result set. |
Database.QuerySingle( SQLstatement [, parameters] ) | Execute the SQL statement SQLstatement (with optional parameters) and return a single record. |
Database.QueryValue( SQLstatement [, parameters] ) | Execute the SQL statement SQLstatement (with optional parameters) and return a single value. |