IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesASP ClassicDatabase  Print This     

Cross Ref > Database

By Mike Prestwood

ASP Classic versus PHP: A side by side comparison between ASP Classic and PHP.

 
Database
 

This category documents connecting and using data including database commands, and common technologies used.

Edit Record

[Other Languages] 

Languages Focus

This common syntax name documents editing a record as a whole: add/insert, edit, post data, and delete.

ASP Classic:   AddNew, Update, Delete

In ASP, using ADO, you use RecordSet.AddNew to add a new record, Recordset.Update to post the record, and RecordSet.Delete to delete it. To edit a record, you open the RecordSet using an editable cursor.

Syntax Example:

The following code snippet adds a record to a given editable RecordSet with FullName and Created fields:

objRS.AddNew
objRS.Fields("FullName") = "Barack Obama"
objRS.Fields("Created")  = Now
objRS.Update
[Not specified yet. Coming...]




Filter Records

[Other Languages] 
ASP Classic:   Filter

In ASP, using ADO, you filter a set of records using the Filter property.

Syntax Example:
objRecordSet.Filter = "ExtEmpType='P'"
[Not specified yet. Coming...]




Find Record

[Other Languages] 

Languages Focus

Finding a record is about moving a cursor to a specific record within a set of records (documented here). In addition to finding a record, you can sort, filter, and loop a set of records (documented in their topics).

ASP Classic:   Find, Seek

In ASP, using ADO, you use Find and Seek to move a cursor of a RecordSet to a matching record.

Syntax Example:

Given a valid ADO recordset, the following code snippet finds a specific user and prints out their age:

TC.Find " UserID='mprestwood' "
Response.Write TC.Fields("Age")
[Not specified yet. Coming...]




Record Movement

[Other Languages] 

Languages Focus

Top, bottom, next, and previous.

ASP Classic:   MoveFirst, MoveLast, MoveNext

ASP uses MoveFirst, MoveLast, MoveNext, and MovePrevious to move a database cursor (a RecordSet).

objRecordSet.MoveNext
Syntax Example:

The following snippet moves to the second to last record of a given RecordSet object:

objRecordSet.MoveLast
objRecordSet.MovePrevious
[Not specified yet. Coming...]




Sort Records

[Other Languages] 
ASP Classic:   Sort

In ASP, using ADO, you sort a set of records using the Sort property.

Syntax Example:
objMembersRS.Sort = "FirstName"
[Not specified yet. Coming...]




Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]