Thread: creating table
View Single Post
 
Old January 22nd, 2008, 04:38 PM
ph0neman ph0neman is offline
Authorized User
 
Join Date: Jan 2008
Location: kokomo, IN, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating table

Hello friends... :)

Can someone give me the quick and dirty of how to add a table so that my recordsets printout in a table?

<%
  Option Explicit
  Dim strConnect
%>

<!-- METADATA TYPE="typelib"
              FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<HTML>
<HEAD>
<TITLE>ADO Command Object</TITLE>
</HEAD>
<BODY>

<%
  Dim objCommand, objRS
  Set objCommand = Server.CreateObject("ADODB.Command") ' create the Command object

  ' fill in the command properties
  objCommand.ActiveConnection = strConnect
  objCommand.CommandText = "booyaa"
  objCommand.CommandType = adCmdTable

  ' now execute the command, and capture the selected records in a recordset
  Set objRS = objCommand.Execute

  ' The Command object has done its job, so clean it up
  Set objCommand = Nothing

  ' now loop through the records

  While Not objRS.EOF
   Response.Write objRS("Artist") & ": " & objRS("Album") & ": " & objRS("Year") & "<BR>"
   objRS.MoveNext
  Wend

  ' now close and clean up
  objRS.Close
  Set objRS = Nothing
%>
</BODY>
</HTML>

Do I add the tags inside the While loop? Thank you
__________________
keep your kneeze in the breeze