@puT3
What you are talking about is generally called Scaffolding. It is not a built in feature of classic ASP, but is available in some frameworks for other languages like Rails, PHP and ASP.Net.
That said, building one is something that I guess everyone does sooner or later in one way or form.
To get you started, simply draw out your table and include an edit link in each row, then send that row to somewhere you can edit it.
You must also take into consideration the design of the database with particular regard to data types, joins and referential integrity.
Just wrote a sub that draws out a
recordset to get started, it takes two arguments:
thers = the name of a recordset you have opened.
params is properties for the table tag, ie "style = 'myTableStyle' "
-
Sub DrawTable(ByRef thers, ByVal params)
-
-
If Not left(params,1) = " " then params = " " & params
-
-
thers.movefirst
-
Response.Write "<table" & params & ">"
-
Response.Write "<tr>"
-
For Each header in thers.Fields
-
Response.Write "<th>" & header.Name & "</th>" & vbNewLine
-
Next
-
Response.Write "</tr>" & vbNewLine
-
Do While Not thers.eof
-
Response.Write "<tr>"
-
For Each Field in thers.Fields
-
Response.Write "<td>" & Field & "</td>"
-
Next
-
Response.Write vbNewLine & "</tr>" & vbNewLine
-
thers.movenext
-
Loop
-
Response.Write "</table>"
-
End Sub
-
-
I haven't yet looked into figuring out what the PK of the table is to provide the edit link, might do later if I get time.
Gaz.