ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 2nd, 2004, 04:07 PM
webberwebber webberwebber is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 webberwebber User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
display lookup column 2 data

Hello. Can this be done?

I have an ASP page displaying my Access database record:
<%= rstDBEdit.Fields("forms_desc").Value %>

This displays the data in hidden bound column 1, which are numbers.

How do I display the more meaningful column 2 data? It shows just fine inside the database, as column 1 is hidden.

The Lookup RowSource in my Forms table is:
SELECT DISTINCTROW insco.insco_id AS Expr1, insco.insco_name AS Expr2 FROM insco;

Insco_id is the number - the insco_name displays the corresponding name right inside the Forms table. It is this info that I want to display to the user.

Display Control = Combo Box
Row Source Type = Table/Query
Bound Column = 1
Column Count = 2
Coumn Widths = 0";1"
List Rows = 8
List Width = 1"
Limit To List = Yes

Any ideas? I can't change the database at this point, need to extract via asp... ???

Pamela

Reply With Quote
  #2  
Old February 2nd, 2004, 04:39 PM
Exiled_Fido Exiled_Fido is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Montreal
Posts: 5 Exiled_Fido User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
from what I can gather you're not specifying the right field. instead of

<%= rstDBEdit.Fields("forms_desc").Value %>

you want

<%= rstDBEdit.Fields("Expr2").Value %>

you don't have a field called forms_desc so I don't even know what it's showing you. you can also write a two instead of expr2 but I dont' recomend it. using the name of the field is better.

Reply With Quote
  #3  
Old February 2nd, 2004, 04:51 PM
webberwebber webberwebber is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 webberwebber User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for replying so quickly!

I'm sorry, I failed to mention that

<%= rstDBEdit.Fields("forms_desc").Value %>

corresponds to the database field forms_desc that holds the rowsource lookup query. Displaying the forms_desc field inside my forms table inside the mdb displays the bound column 1 info, which looks like it should evaluate to Expr1.

But I tried that anyway, tried
<%= rstDBEdit.Fields("Expr1").Value %>
and
<%= rstDBEdit.Fields("Expr2").Value %>

but all I got were 0's, not the Column2 data names.

Any other thoughts or glaring errors? Thanks!!

Pamela

Reply With Quote
  #4  
Old February 4th, 2004, 11:21 AM
webberwebber webberwebber is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 webberwebber User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to get to the unhidden column2 data residing in the lookup query residing in the forms_desc field?

<%= rstDBEdit.Fields("forms_desc").[0,1].Value %>

Any ideas on the syntax? This is driving me mad.

Pamela

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > display lookup column 2 data


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT