Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

ASP.NET web Pages Database reference manual


May 12, 2021 ASP.NET


Table of contents


ASP.NET Web Pages - Database object


This section provides ASP.NET a reference manual for Web Pages Database objects, describing methods in database objects.

ASP.NET database object reference manual


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.