Recommended: ASP tips: rs.getrows method GetRows() method is to copy data from Recordset to 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) means the first field value of the first row of the record set rsArray(1, 0) means the data of the second field value array in the first row of the record set is guaranteed.
This example mainly tells how to use Create, Drop and Alter statements to add and delete ACCESS tables and fields. The code is as follows:
<%
''''''''''''''''''''''''''''''''''''
' Add, delete tables and fields
' ├Create Table Table Name(field1 type[(size)] [null|not null] [default eExpression] [primary key][,field2...])
' type:counter;text(num);char(num),varchart(num);memo;short;long;single;double;date/time;logical;currency;oleobject
' ├Drop Table Name
' ├Alter Table Table Name Add Column field type[(size)][not null]
' ├Alter Table Table NameDrop Column field
''''''''''''''''''''''''''''''''''''
Dim objConn,strsql
Set objConn = Server.CreateObject(ADODB.Connection)
objConn.open Driver={Microsoft Access Driver (*.mdb)};Dbq= & Server.MapPath(webjxcom.mdb)
strsql = Create table mzwucom(id counter primary key,name char(20),url char(50),hits short)
objConn.execute(strsql)
strsql = Alter table mzwucom add column field1 text(20)
objConn.execute(strsql)
strsql = Alter table mzwucom add column field2 text(20)
objConn.execute(strsql)
strsql = Alter table mzwucom drop column field2
objConn.execute(strsql)
strsql = drop table mzwucom
objConn.execute(strsql)
%>
Share: 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