|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello everyone:
I am trying to build an interactive web page. That page allows users to input whatever SQL query language, and return the corresponding results. Of course, it has been linked with database. But till now, although I can use the recordset to store the query results, I can not show the results. Because I don't know which column will be chosen by user. Any method or function in ASP can help me to show all the columns in the recordset Cheers |
|
#2
|
||||
|
||||
|
You can retrieve the field names from a recordset like this,
Code:
for each f in RS.Fields
Response.Write("<td><b>" & f.Name & "</b></td>")
next
|
|
#3
|
|||
|
|||
|
It seems not to work. The each field name is dynamic.
eg: if user inputs "select f1,f2 from t1", it should show two fields. if user inputs "select * from t1", it should show all fields. I do not know how to display the field name dynamically. cheers |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > how to show the query results in ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|