Padding Padding
Janet
Systems
 Register  Login 
Telephone  01628 566 178
Website Design, Hosting and Software Services
  Search 
Padding
corner Padding corner
Padding Padding
corner Padding corner
 ASP Articles

The following code may be used to derive details about the name, value and type for each column in the current row of a database table.

<%
For Each fieldF in OBjRS.Fields
fieldName = fieldF.Name
fieldType = fieldF.Type
fieldValue = fieldF.Value
Next
%>

It is assumed that OBjRS relates to the database SQL statment and this piece of code is wrapped in a do while loop.

Unfortunately, the information returned relating to the field type is not in an easily understood form. Given below is a table of field types with their corresponding returned integer value.

Value Column Type
0 Empty
2 SmallInt
3 Integer
4 Single
5 Double
6 Currency
7 Date
8 BSTR
9 IDispatch
10 Error
11 Boolean
12 Variant
13 IUnknown
14 Decimal
16 TinyInt
17 UnsignedTinyInt
18 UnsignedSmallInt
19 UnsignedInt
20 BigInt
21 UnsignedBigInt
64 FileTime
72 GUID
128 Binary
129 Char
130 WChar
131 WChar Numeric
132 UserDefined
133 DBDate
134 DBTime
135 DBTimeStamp
136 Chapter
138 PropVariant
139 VarNumeric
200 VarChar
201 LongVarChar
202 VarWChar
203 LongVarWChar
204 VarBinary
205 LongVarBinary
&H2000 Array

 

NAT July 2005 (Revised)


This article viewed: 1024 times Back

Copyright © 2004-2007 Janet Systems Ltd.

 Print   

DotNetNuke Website design and hosting from £15.00 per month. More...

Looking for a website design company in the Thames Valley, call us on 01628 566178

DotNetNuke Modules
DotNetNuke Modules availalble from Janet Systems

DotNetNuke Skins
DotNetNukeSkins.gif

from Janet Systems

Padding
Copyright 2002-2008 Janet Systems Ltd.   Terms Of Use  Privacy Statement Tuesday, May 13, 2008