Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL select

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-23 : 12:59:45
Chris writes "How can I select from multiple tables in the following asp code. I have NT Server 4.0 sp6 with SQL server 7.0. Each response.write line is information from from differant tabels.

<!--
Set connectionToDatabase=server.createobject("ADODB.Connection")
connectiontodatabase.connectiontimeout=60
connectiontodatabase.Open "DSN=supplies"
Set recordcollection=connectiontodatabase.execute("SELECT * FROM Stations")
response.write("<Table Border=1><TR><th>Station</th><th>Date</th><th>Item</th></tr>")
Do While Not recordcollection.eof
response.write("<tr>")
response.write("<td>" & recordcollection("st_name") & "</td>")
response.write("<td>" & recordcollection("order_date") & "</td>")
response.write("<td>" & recordcollection("item_name") & "</td>")
response.write("</tr>")
recordcollection.movenext
loop
response.write("</table>")
connectiontodatabase.Close
Set connectiontodatabase=nothing-->
"
   

- Advertisement -