Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field List

Status
Not open for further replies.

Deltaflyer

Programmer
Oct 11, 2000
184
GB
To access the database i am using :

oRecord.Open "Select * From Tbl",oConnect,3

is there any kind of oRecord.Index, that will return all the field names that have been included in the recordset. DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
Use the Recordset.Fields object. Each field in the recordset is represented by a Field object in that collection, of which you can access the Name property.

You could probably do a for each loop through that collection, and pull out the name of the field each time through.

ray
rheindl@bju.edu

 
I shall give it a shot.

Cheers frogger. DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
Frogger,

have tried that using the following code

ssql = "Select * from tbl_mas_pipeline"
oRecord.Open ssql, oConnect, 1
fieldlist = oRecord.Fields
Response.Write fieldlist &amp; &quot;<br>&quot;


this is the error i get,

Wrong number of arguments or invalid property assignment: 'fieldlist'

any ideas??

DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
Sorry frogger, sorted it used the following.

for each oField in oRecord.fields
Response.Write &quot;<th>&quot; &amp; oField.name &amp; &quot;</th>&quot;
next


DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
yep, the for each loop is the key when going through a collection ray
rheindl@bju.edu

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top