How do display our result out from SQL Server
Display our result out from SQL Server
The method used to display data from a search query is the same as the method employed in Access database.
Set conn = Server.CreateObject("ADODB.Connection")
cn.Open "DSN=myDSN;UID=sa;PWD=;DATABASE=pubs"
Set rs = Server.CreateObject("ADODB.Recordset")
Rs.open "Select * from employee", conn, 1,3
‘ we’re constructing a loop to display all the data out
do while rs.eof <> true
response.write(rs("name"))
response.write("
")
response.write(rs("position"))
rs.movenext
loop
No comments:
Post a Comment