Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 March 26th, 2004, 01:37 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default assign a recordset to a variable

Bit of a newbee question

I need to add 3 repeating fields from a orders table into one variable. I can display the records but not sure how to store them in a variable.

For example my variable is "items"

recordset fldName fldNum fldQty

variable "items" should = tshirt 123abc 5, shorts 123xyz 2

and so on

any ideas!

 
Old March 26th, 2004, 03:22 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

You could build a string from the record set. e.g

Field1|Field2|
A 1
B 2
The logic will look like this(Syntax not 100%)
Do Until rs.eof
  X = rs[Field1] & "," & rs[Field2] & "," & X
  Movenext
Loop
The result will be X = A,1,B,2

Hope this helps

Regards
Marnus





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to assign a new value to Classic ASP variable mcinar Javascript How-To 4 April 14th, 2008 06:02 PM
Assign Session variable from view or controller Alaphat ASP.NET 2.0 Professional 2 April 11th, 2008 09:37 AM
assign XSLT variable to a wml variable arunagottimukkala XSLT 2 October 19th, 2007 05:15 AM
assign javascript variable to asp variable manjunath_c_k Classic ASP Basics 1 September 14th, 2006 07:35 AM
assign a recordset to a variable biggen55 VB How-To 1 March 26th, 2004 02:26 PM





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