Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RecordSet definition
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00515117
Message ID:
00515274
Views:
12
>Greetings,
>
> I heard we could retrieve definition of a RecordSet after execution of a sql query.
> Set rstSearch=server.createobject("adodb.recordset")
>
> - Number of field
> - Fieds type
>
> Example : Set rstSearch = maindb.Execute(strSQL)
>Is it possible ?

Yes it is possible. Here is what I get from the Immediate window in VB (it also can be used in VBScript):
? rstData.Fields.Count
6
for i = 0 to rstdata.Fields.Count-1: ? rstdata.Fields(i).Name & ": " & rstdata.Fields(i).Type : next
ImportationID: 3
TraitementID: 3
Traitement: 202
DateTraitement: 135
Differe: 17
FileName: 202

See http://www.able-consulting.com/ADODataTypeEnum.htm to know the definition of the numeric type value.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform