scopeSets the scope of the object (either Session or Application)idSpecifies a unique id for the objectProgIDAn id associated with a class id. The format for ProgID is [Vendor.]Component[.Version]
Either ProgID or ClassID must be specified.
ClassIDSpecifies a unique id for a COM class object.
Either ProgID or ClassID must be specified
范例 第一个例子创建了一个对象范围的会议名为“ MyAd ”使用的ProgID参数:
第二个例子创建了一个对象的适用范围命名为“ MyConnection ”使用的ClassID参数:
申报的对象在Global.asa文件可以使用任何脚本的应用程序:
GLOBAL.ASA:
You could reference the object "MyAd" from any page in the ASP application:
file
Specifies an absolute path to a type library.
Either the file parameter or the uuid parameter is required
uuid
Specifies a unique identifier for the type library.
Either the file parameter or the uuid parameter is required
version
Optional. Used for selecting version. If the requested version is not found, then the most recent version is used
lcid
Optional. The locale identifier to be used for the type library
误差值
该服务器可返回下列其中一个错误讯息:
Error Code
Description
ASP 0222
Invalid type library specification
ASP 0223
Type library not found
ASP 0224
Type library cannot be loaded
ASP 0225
Type library cannot be wrapped
sub getcustomers
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
set rs=conn.execute("select name from customers")
Application("customers")=rs.GetRows
rs.Close
conn.Close
end sub