Jump to content

how to display fields name?


kewlsammie

Recommended Posts

I am currently doing a search engine.. and.. i am intending to do a drop down menu to allow user to choose the type of fields to be displayed in the drop down menu as in... sn, name, address, blah blah~~ anyone knoe how i can solve this?? because i can do the simple ones like displaying say.... field name is "name" and i display susan, peter and blah blah in the drop down menu. Thankz In Advance PPl!!

Link to comment
Share on other sites

Try this...'establish connection to the database to open recordset'--------------------------------------------------------------------------------sSQL = "Select * from tbl_name;" Set oConn = Server.CreateObject("ADODB.Connection")Set oRs = Server.CreateObject("ADODB.Recordset")oRs.Open sSQL, oConn, 1, 3oRs.MoveFirst' will give the number of fieldsresponse.write(oRS.Fields.Count)For Each oField In oRS.Fieldsresponse.write(oField.Name)Next

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...