andycharger
Well-known member
- Joined
- Apr 2, 2003
- Messages
- 152
Im trying to put a table on my form to display a list of results from a plans table on my database.
However, I need to know how I get it to the screen.
Do I put the code for accessing the data in the code section or in the HTML section? Also how is best to put it into a table?
Here is my code so far:
Thanks!
However, I need to know how I get it to the screen.
Do I put the code for accessing the data in the code section or in the HTML section? Also how is best to put it into a table?
Here is my code so far:
Code:
Dim oConn As SqlConnection
Dim oComm As SqlCommand
Dim oReader As SqlDataReader
Dim sSQL As String
Dim sConn As String
Dim strDept As String
strDept = Request.QueryString("dept_id")
sSQL = "SELECT * "
sSQL += "FROM Plans where department_id = " & strDept
sConn = ConfigurationSettings.AppSettings("ConnectionString")
oConn = New SqlConnection(sConn)
oConn.Open()
oComm = New SqlCommand(sSQL, oConn)
oReader = oComm.ExecuteReader()
**********writing the results to a table I expect should go here *********
oConn.Close()
Thanks!