Menu
×

Được chứng nhận

Ghi lại kiến ​​thức của bạn

Đăng nhập Đăng ký

Tạo Tài khoản Example.com.vn miễn phí để cải thiện trải nghiệm học tập của bạn

Người tìm đường và việc học của tôi

Theo dõi tiến độ học tập của bạn tại Example.com.vn và thu thập phần thưởng

Nâng cấp

Trở thành người dùng PLUS và mở khóa các tính năng mạnh mẽ (không có quảng cáo, lưu trữ, hỗ trợ, ..)

Bắt đầu từ đâu

Bạn không chắc chắn muốn bắt đầu từ đâu? Đi theo con đường được hướng dẫn của chúng tôi

Trình chỉnh sửa mã (Dùng thử)

Với trình chỉnh sửa mã trực tuyến của chúng tôi, bạn có thể chỉnh sửa mã và xem kết quả trong trình duyệt của mình

Video

Tìm hiểu những điều cơ bản về HTML qua video hướng dẫn thú vị và hấp dẫn

Mẫu

Chúng tôi đã tạo một loạt mẫu trang web đáp ứng mà bạn có thể sử dụng - miễn phí!

Web hosting

Lưu trữ trang web của riêng bạn và chia sẻ nó với mọi người với Example.com.vn Spaces

Tạo một máy chủ

Tạo máy chủ của riêng bạn bằng Python, PHP, React.js, Node.js, Java, C#, v.v.

Làm thế nào để

Bộ sưu tập lớn các đoạn mã cho HTML, CSS và JavaScript

Khung CSS

Xây dựng các trang web nhanh và phản hồi bằng cách sử dụng khung W3.CSS miễn phí của chúng tôi

Thống kê trình duyệt

Đọc xu hướng dài hạn của việc sử dụng trình duyệt

Tốc độ gõ

Kiểm tra tốc độ đánh máy của bạn

Đào tạo AWS

Tìm hiểu dịch vụ web của Amazon

Bộ chọn màu

Sử dụng công cụ chọn màu của chúng tôi để tìm các màu RGB, HEX và HSL khác nhau. Bánh xe màu hình tròn thể hiện sự chuyển màu trong quang phổ

Trò chơi mã

Trò chơi mã hóa W3Schools! Giúp linh miêu thu thập nón thông Logo Lynx

Đặt mục tiêu

Nhận hành trình học tập được cá nhân hóa dựa trên các kỹ năng và mục tiêu hiện tại của bạn

Bản tin

Tham gia bản tin của chúng tôi và có quyền truy cập vào nội dung độc quyền mỗi tháng

Việc làm

Thuê những tài năng công nghệ hàng đầu. Hợp lý hóa quy trình tuyển dụng của bạn để có đội ngũ phù hợp hoàn hảo

Lớp học

Hãy liên hệ để sử dụng Example.com.vn Plus và các chứng chỉ với tư cách là một tổ chức giáo dục

×
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP CÁCH W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS AN NINH MẠNG DỮ LIỆU KHOA HỌC

Hướng dẫn ASP

TRANG CHỦ ASP

Hướng dẫn WP

Trang web Giới thiệu Trang web Dao cạo Bố cục trang web Trang web Thư mục Trang web Trang web toàn cầu Biểu mẫu Trang web Đối tượng Trang web Tệp Trang web Cơ sở dữ liệu Trang web Trình trợ giúp Trang web WebGrid Trang web Biểu đồ Trang web Email Trang web Bảo mật Trang web Xuất bản trang web Ví dụ về trang web Lớp học

Dao cạo ASP.NET

Dao cạo Giới thiệu Dao cạo Cú pháp Dao cạo C# Biến Dao cạo C# Vòng lặp Dao cạo C# Logic Dao cạo VB Biến Dao cạo VB Vòng lặp Dao cạo VB Logic

ASP cổ điển

Giới thiệu ASP Cú pháp ASP Biến ASP Thủ tục ASP Điều kiện ASP Vòng lặp ASP Biểu mẫu ASP ASP Cookie Phiên ASP Ứng dụng ASP ASP #include ASP Global.asa ASP AJAX ASP e-mail ASP Ví dụ về Chứng chỉ ASP

Tham khảo ASP

Chức năng ASP VB ASP VB Từ khóa ASP Phản hồi ASP Yêu cầu ASP Ứng dụng ASP Phiên ASP Máy chủ ASP Lỗi ASP Hệ thống tệp ASP TextStream Ổ đĩa ASP Tệp ASP Thư mục ASP Từ điển ASP ASP AdRotator ASP BrowserCap Liên kết nội dung ASP Công cụ quay vòng nội dung ASP Tham chiếu nhanh ASP

Hướng dẫn ADO

ADO Giới thiệu ADO Kết nối ADO Recordset ADO Hiển thị ADO Truy vấn ADO Sắp xếp ADO Thêm ADO Cập nhật ADO Xóa

Đối tượng ADO

Lệnh ADO Kết nối ADO Lỗi ADO Trường ADO Tham số ADO Thuộc tính ADO Bản ghi ADO Tập bản ghi ADO Luồng ADO Kiểu dữ liệu ADO

Đối tượng tập bản ghi ADO


Đối tượng tập bản ghi

Đối tượng ADO Recordset được sử dụng để lưu giữ một tập hợp các bản ghi từ một bảng cơ sở dữ liệu. Đối tượng Recordset bao gồm các bản ghi và cột (trường).

Trong ADO, đối tượng này là quan trọng nhất và được sử dụng thường xuyên nhất để thao tác dữ liệu từ cơ sở dữ liệu.


ID chương trình

set objRecordset=Server.CreateObject("ADODB.recordset")

Khi bạn mở Tập bản ghi lần đầu tiên, con trỏ bản ghi hiện tại sẽ trỏ đến bản ghi đầu tiên và thuộc tính BOF và EOF là Sai. Nếu không có bản ghi nào thì thuộc tính BOF và EOF là True.

Các đối tượng Recordset có thể hỗ trợ hai kiểu cập nhật:

  • Cập nhật ngay lập tức - tất cả các thay đổi được ghi ngay vào cơ sở dữ liệu sau khi bạn gọi phương thức Cập nhật.
  • Cập nhật hàng loạt - nhà cung cấp sẽ lưu trữ nhiều thay đổi vào bộ đệm và sau đó gửi chúng đến cơ sở dữ liệu bằng phương thức UpdateBatch.

Trong ADO có 4 loại con trỏ khác nhau được xác định:

  • Con trỏ động - Cho phép bạn xem các bổ sung, thay đổi và xóa của người dùng khác.
  • Con trỏ bộ phím - Giống như con trỏ động, ngoại trừ việc bạn không thể thấy phần bổ sung của người dùng khác và nó ngăn quyền truy cập vào các bản ghi mà người dùng khác đã xóa. Những thay đổi dữ liệu của người dùng khác sẽ vẫn hiển thị.
  • Con trỏ tĩnh - Cung cấp bản sao tĩnh của tập bản ghi để bạn sử dụng để tìm dữ liệu hoặc tạo báo cáo. Những bổ sung, thay đổi hoặc xóa của người dùng khác sẽ không hiển thị. Đây là loại con trỏ duy nhất được phép khi bạn mở đối tượng Recordset phía máy khách.
  • Con trỏ chỉ chuyển tiếp - Cho phép bạn chỉ cuộn về phía trước trong Recordset. Những bổ sung, thay đổi hoặc xóa của người dùng khác sẽ không hiển thị.

Loại con trỏ có thể được đặt bằng thuộc tính CursorType hoặc bằng tham số CursorType trong phương thức Open.

Lưu ý: Không phải tất cả các nhà cung cấp đều hỗ trợ tất cả các phương thức hoặc thuộc tính của đối tượng Recordset.



Của cải

Property Description
AbsolutePage Sets or returns a value that specifies the page number in the Recordset object
AbsolutePosition Sets or returns a value that specifies the ordinal position of the current record in the Recordset object
ActiveCommand Returns the Command object associated with the Recordset
ActiveConnection Sets or returns a definition for a connection if the connection is closed, or the current Connection object if the connection is open
BOF Returns true if the current record position is before the first record, otherwise false
Bookmark Sets or returns a bookmark. The bookmark saves the position of the current record
CacheSize Sets or returns the number of records that can be cached
CursorLocation Sets or returns the location of the cursor service
CursorType Sets or returns the cursor type of a Recordset object
DataMember Sets or returns the name of the data member that will be retrieved from the object referenced by the DataSource property
DataSource Specifies an object containing data to be represented as a Recordset object
EditMode Returns the editing status of the current record
EOF Returns true if the current record position is after the last record, otherwise false
Filter Sets or returns a filter for the data in a Recordset object
Index Sets or returns the name of the current index for a Recordset object
LockType Sets or returns a value that specifies the type of locking when editing a record in a Recordset
MarshalOptions Sets or returns a value that specifies which records are to be returned to the server
MaxRecords Sets or returns the maximum number of records to return to a Recordset object from a query
PageCount Returns the number of pages with data in a Recordset object
PageSize Sets or returns the maximum number of records allowed on a single page of a Recordset object
RecordCount Returns the number of records in a Recordset object
Sort Sets or returns the field names in the Recordset to sort on
Source Sets a string value or a Command object reference, or returns a String value that indicates the data source of the Recordset object
State Returns a value that describes if the Recordset object is open, closed, connecting, executing or retrieving data
Status Returns the status of the current record with regard to batch updates or other bulk operations
StayInSync Sets or returns whether the reference to the child records will change when the parent record position changes

phương pháp

Method Description
AddNew Creates a new record
Cancel Cancels an execution
CancelBatch Cancels a batch update
CancelUpdate

Cancels changes made to a record of a Recordset object

Clone Creates a duplicate of an existing Recordset
Close Closes a Recordset
CompareBookmarks Compares two bookmarks
Delete Deletes a record or a group of records
Find Searches for a record in a Recordset that satisfies a specified criteria
GetRows Copies multiple records from a Recordset object into a two-dimensional array
GetString Returns a Recordset as a string
Move Moves the record pointer in a Recordset object
MoveFirst Moves the record pointer to the first record
MoveLast Moves the record pointer to the last record
MoveNext Moves the record pointer to the next record
MovePrevious Moves the record pointer to the previous record
NextRecordset Clears the current Recordset object and returns the next Recordset object by looping through a series of commands
Open Opens a database element that gives you access to records in a table, the results of a query, or to a saved Recordset
Requery Updates the data in a Recordset by re-executing the query that made the original Recordset
Resync Refreshes the data in the current Recordset from the original database
Save Saves a Recordset object to a file or a Stream object
Seek Searches the index of a Recordset to find a record that matches the specified values
Supports Returns a boolean value that defines whether or not a Recordset object supports a specific type of functionality
Update Saves all changes made to a single record  in a Recordset object
UpdateBatch Saves all changes in a Recordset to the database. Used when working in batch update mode

Sự kiện

Lưu ý: Bạn không thể xử lý các sự kiện bằng VBScript hoặc JScript (chỉ các ngôn ngữ Visual Basic, Visual C++ và Visual J++ mới có thể xử lý các sự kiện).

Event Description
EndOfRecordset Triggered when you try to move to a record after the last record
FetchComplete Triggered after all records in an asynchronous operation have been fetched
FetchProgress Triggered periodically in an asynchronous operation, to state how many more records that have been fetched
FieldChangeComplete Triggered after the value of a Field object change
MoveComplete Triggered after the current position in the Recordset has changed
RecordChangeComplete Triggered after a record has changed
RecordsetChangeComplete Triggered after the Recordset has changed
WillChangeField Triggered before the value of a Field object change
WillChangeRecord Triggered before a record change
WillChangeRecordset Triggered before a Recordset change
WillMove Triggered before the current position in the Recordset changes

Bộ sưu tập

Collection Description
Fields Indicates the number of Field objects in the Recordset object
Properties Contains all the Property objects in the Recordset object

Thuộc tính của Bộ sưu tập Trường

Property Description
Count Returns the number of items in the fields collection. Starts at zero.

Example:

countfields=rs.Fields.Count

Item(named_item/number) Returns a specified item in the fields collection.

Example:

itemfields=rs.Fields.Item(1)
or
itemfields=rs.Fields.Item("Name")


Thuộc tính của Bộ sưu tập Thuộc tính

Property Description
Count Returns the number of items in the properties collection. Starts at zero.

Example:

countprop=rs.Properties.Count

Item(named_item/number) Returns a specified item in the properties collection.

Example:

itemprop = rs.Properties.Item(1)
or
itemprop=rs.Properties.Item("Name")


×

Liên hệ bán hàng

Nếu bạn muốn sử dụng dịch vụ của Example.com.vn với tư cách là một tổ chức giáo dục, nhóm hoặc doanh nghiệp, hãy gửi email cho chúng tôi:
[email được bảo vệ]

Báo cáo lỗi

Nếu bạn muốn báo cáo lỗi hoặc nếu bạn muốn đưa ra đề xuất, hãy gửi email cho chúng tôi:
[email được bảo vệ]

Example.com.vn được tối ưu hóa cho việc học tập và đào tạo. Các ví dụ có thể được đơn giản hóa để cải thiện khả năng đọc và học. Các hướng dẫn, tài liệu tham khảo và ví dụ liên tục được xem xét để tránh sai sót, nhưng chúng tôi không thể đảm bảo tính chính xác hoàn toàn của mọi nội dung. Khi sử dụng W3Schools, bạn đồng ý đã đọc và chấp nhận các điều khoản sử dụng , chính sách cookie và quyền riêng tư của chúng tôi.

Bản quyền 1999-2024 của Refsnes Data. Đã đăng ký Bản quyền. Example.com.vn được cung cấp bởi W3.CSS .