Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 10th, 2004, 10:18 PM
Authorized User
 
Join Date: Aug 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default recordset concerned

while not Rs.Eof
   for each Field in Rs.Fields
          response.write Field.value
      next
      Rs.moveNext
Wend
------------------------------------------------
usually, we use some code like above to process data.
well, if i know only one Field exists in each Record, then blue code will be reluctant. how to improve this?
for example. strSQL="show tables"
Rs strSQL conn.....

 
Old August 11th, 2004, 12:23 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  If only one field is there,
  Why to use loop. You can use the field name know!

while not rs.eof
response.write rs("fieldname")
  rs.movenext
wend

if you dont know the fieldname, then you can minimize the processing time using...
  find fieldcount and do looping if the fieldcount is > 1








Similar Threads
Thread Thread Starter Forum Replies Last Post
Clone DAO Recordset into ADO Recordset kamrans74 VB How-To 0 March 6th, 2007 11:57 AM
Query from Recordset into another Recordset kamrans74 Pro VB Databases 5 March 5th, 2007 04:17 PM
A bit concerned JoanW BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 1 April 24th, 2006 08:24 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
Convert ADO recordset to DAO recordset andrew_taft Access 1 May 5th, 2004 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.