Recommended: Asp Fso file/folder operation class As mentioned earlier, this just pushes some functions together. In fact, it is better to put some function set methods in the program. Main functions: 1. Create a delete folder 2. Get the folder name and number of folders in a folder 3. Get the file name and number of files in a folder 4. Check whether a folder exists 5. Check whether a file exists 6. Delete
The GetRows() method is to copy data from Recordset into a two-dimensional array. This is a two-dimensional array. The first subscript marks the field and the second marks the record number.
So rsArray = rs.GetRows()
rsArray(0, 0) represents the first field value of the first row of the record set.
rsArray(1, 0) represents the second field value of the first row of the record set.
The data of the array is stored in memory, which fundamentally solves the trouble of asking the database for each record display.
Reference: Detailed introduction and usage of GetRows()
GetRows method
Restores multiple records of the Recordset object into the array.
grammar
array = recordset.GetRows( Rows, Start, Fields )
Return value
Returns a two-dimensional array.
parameter
Rows Optional, long integer expression, specifying the number of records to be retrieved. The default value is adGetRowsRest (-1).
Start optional, string or long integer, calculates the bookmark of the record at the start of the GetRows operation. The following BookmarkEnum values can also be used.
Constant Description
AdBookmarkCurrent starts with the current record.
AdBookmarkFirst starts with the first record.
AdBookmarkLast starts with the tail record.
Fields Optional, variant, representing a single field name, sequential position, field name array, or sequential position number. ADO returns only the data in these fields.
illustrate
Use the GetRows method to copy records from Recordset into a 2D array. The first subscript identifies the field, and the second subscript identifies the record number. The array variable will automatically be adjusted to the correct size when the GetRows method returns data.
If the value of the Rows parameter is not specified, the GetRows method automatically retrieves all records in the Recordset object. If there are more records requested than available records, GetRows returns only the number of available records.
If the Recordset object supports bookmarks, you can specify which record the GetRows method will start to retrieve data by transferring the Bookmark property value of the record.
To restrict fields returned by GetRows calls, you can transfer a single field name/number or field name/number array in the Fields parameter.
After the call to GetRows, the next unread record becomes the current record, or if there are no more records, the EOF property is set to True.
Share: Asp time processing function A function of conversion time. The time processing in kingcms is also very powerful, so you can check it out if you have time. The date() function in PHP is so powerful that I can't help but use ASP to imitate it... but I just wrote it until the day, but I haven't written it yet. So this function has not yet been formatted with hours, minutes, and seconds, and I will add it after I have time. % '******