Pseudo-Objects in Active Server Pages
<%
' FieldInspection.asp - Example program to show inspection of the fields of a
' pseudo-object.
option explicit
%>
NOTE: include file="db.inc"
NOTE: include file="Entity.inc"
NOTE: include file="Car2.inc"
<%
dim car
dim fieldNames
dim field
dim i
' Create Car and get array of fields.
set car = Car_New()
fieldNames = car.Keys()
' Show fields and field types.
Response.Write "
" & vbCrLf
Response.Write "Fields of Car pseudo-object:" & vbCrLf & vbCrLf
for i = 0 to UBound(fieldNames)
field = car(fieldNames(i))
Response.Write fieldNames(i) & ": " & TypeName(field) & vbCrLf
next
Response.Write "
" & vbCrLf
%>
Page 8 of 11
This article was originally published on October 14, 1999