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 December 22nd, 2004, 10:22 AM
Authorized User
 
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default MultiValued Fields

Using SQL Server 7 db. How do I deal with multivalued fields, as far as displaying them on a web page using ASP. Need to be pointed in the right direction.

Mike
__________________
Mike
 
Old December 22nd, 2004, 01:57 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mike,

Can you post the query you want to display & how you'd like to see it?

Cheers,

Chris


 
Old December 22nd, 2004, 05:01 PM
Authorized User
 
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

using this to display first record of multivalued field
Dim strIchar, strItext, intIcount, strIname

strIchar = chr(178)
strItext = RS("i_name")
intIcount = Instr(strItext, strIchar)

If intIcount = "0" Then
    Response.Write strItext
Else
    strIlname = mid(strItext, 1, intIcount-1)
Response.Write strIname
End If

I need to display rest of data and would like to maybe insert a carriage return at every point where a special character lies that serparates each record.

Mike
 
Old December 22nd, 2004, 05:23 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mike,

Hope this is what you are after...
Code:
Response.Write Replace(strItext, strIchar, "<br />")
Cheers,

Chris

 
Old December 29th, 2004, 05:37 PM
Authorized User
 
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it worked.

Thanks Chris

Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking Up Values In Other Fields meista Crystal Reports 0 December 11th, 2006 07:50 AM
(a)sociative fields icopec C++ Programming 0 March 12th, 2005 08:09 AM
Using Forum fields select fields on the fly hellosureshkumar Crystal Reports 0 December 17th, 2004 08:20 AM
Using fields morpheus Classic ASP Databases 9 November 20th, 2003 12:43 PM
Memo fields takabyte Classic ASP Basics 2 October 31st, 2003 06:13 PM





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