Please enable JavaScript to view this site.

Navigation: » No topics above this level «

DAL method: Update() (Deprecated)

Scroll Prev Next More

 

Deprecated

This function is deprecated, and we recommend using the DB:Exec() function from Database API.

 

Updates one or more records in the database.

Syntax

Update()

Arguments

No arguments.

Return value

No return value.

Example

Update the record where ID is 32, making the FirstName field value 'Jim' and LastName field value 'Morrison':

 

dynamic tblUsers = GlobalVars.dal.Table("UsersTable");
tblUsers.Param["ID"] = 32;
tblUsers.Value["FirstName"] = "Jim";
tblUsers.Value["LastName"] = "Morrison";
tblUsers.Update();

 

The corresponding SQL query:

 

Update UsersTable set FirstName='Jim', LastName='Morrison' where ID=32

See also:

DB API: Exec

Database API

Example: Update multiple tables

About Data Access Layer