May 12, 2021 ASP.NET
method | describe |
---|---|
Database.Execute( SQLstatement [ , parameters]) | Execute SQL statement SQLstatement (With optional parameters), such as INSERT, DELETE, or UPDATE, and return the affected record statistics. |
Database.GetLastInsertId() | Returns the identity column that is recently inserted. |
Database.Open(
filename
)
Database.Open( connectionStringName ) |
use Web.config The connection string in the file opens the specified database file or the specified database. |
Database.OpenConnectionString( connectionString ) | Use the connection string to open a database.(Differences with Database.open is that Database.Open is used by the name of the connection string, and the value of the connection string is configured elsewhere.) |
Database.Query( SQLstatement[, parameters] ) | Use SQL statements SQLstatement (With an optional parameter) query the database and return the result collection. |
Database.QuerySingle( SQLstatement [, parameters] ) | Execute SQL statement SQLstatement (With optional parameters) and return a single record. |
Database.QueryValue( SQLstatement [, parameters] ) | Execute SQL statement SQLstatement (With optional parameters) and return a single value. |