Hi, I am currently using this to display the recordset from my DB, it works fine. My issue is this:
I am wanting the results from the DB to be displayed in a text field, so they can be updated, (obviously this will include the relevant update statement etc), but I am unsure as to how to get this type of formatting into the page. The code below selects all of the data that is relevant to the userid from the database, each user can have any number of records in the table, from 1 to 1000, so each varying number of records is displyed.
Can anyone assist?
Thanks in advance
Richard Noon
I am wanting the results from the DB to be displayed in a text field, so they can be updated, (obviously this will include the relevant update statement etc), but I am unsure as to how to get this type of formatting into the page. The code below selects all of the data that is relevant to the userid from the database, each user can have any number of records in the table, from 1 to 1000, so each varying number of records is displyed.
Can anyone assist?
Code:
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.Open "D:/Websites/richard/admin/db/users.mdb"
strSQL = "Select * From tblQual WHERE UserID ='" & strUsername & "'"
Set rsCheckUser = conn.Execute(strSQL)
If NOT rsCheckUser.EOF Then
While NOT rsCheckUser.EOF
strUserName = rsCheckUser("UserID")
If strUserName <> strOldUserName Then
Response.Write "<tr><td colspan='2'><h2>" & strUserName & "</h2></td></tr>" & vbcrlf
End If
Response.Write "<tr><td><p>" & rsCheckUser("AchDte") & "</p></td><td><p>" & rsCheckUser("AchType") & "</p></td><td><p>" & rsCheckUser("AchTitle") & "</p></td><td><p>" & rsCheckUser("AchGrade") & "</p></td><td><p>" & rsCheckUser("InstitutionName") & "</p></td></tr>"
strOldUserName = strUserName
rsCheckUser.MoveNext
Wend
Else
Response.Write "<tr><td colspan='2'><p>No records found</p></td></tr>" & vbcrlf
End If
Set rsCheckUser = Nothing
conn.Close
Set conn = Nothing
%>
Thanks in advance
Richard Noon