Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Field List

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,121
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Field List
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Field List - 6/6/2001 4:57:20 AM   
  bigtop

 

Posts: 15
Score: 0
Joined: 5/31/2001
From: USA
Status: offline
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.
 
 
Post #: 1
 
 Re: Field List - 6/6/2001 4:59:11 AM   
  drkesrel

 

Posts: 11
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
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.

(in reply to bigtop)
 
 
Post #: 2
 
 Re: Field List - 6/6/2001 5:03:46 AM   
  itan

 

Posts: 10
Score: 0
Joined: 5/31/2001
From: USA
Status: offline
have tried that using the following code

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

this is the error i get,

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

any ideas??

(in reply to bigtop)
 
 
Post #: 3
 
 Re: Field List - 6/6/2001 5:05:03 AM   
  drkesrel

 

Posts: 11
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
yep, the for each loop is the key when going through a collection

(in reply to bigtop)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Field List Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts