ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

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 ASP Free Forums Sponsor:
  #1  
Old March 10th, 2008, 02:57 PM
kom_s kom_s is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 1 kom_s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 0
Please help to display data from DB

Hi all!
Please help me to display my data from access DB.
I have query which gives my data like this


<table CELLSPACING="0" >

<tr>
<td>MY_ID</td>
<td>AAA</td>
<td>BBB</td>
<td>CCC</td>
</tr>

<tr>
<td >1</td>
<td >aaa</td>
<td >asd</td>
<td >asfsaf</td>
</tr>
<tr >
<td >1</td>
<td >dasfaf</td>
<td >dfgsgh</td>
<td >dasfga</td>
</tr>
<tr >
<td >2</td>
<td >dfsgsdfg</td>
<td >dsgadfg</td>
<td >adsgasg</td>
</tr>
<tr>
<td >3</td>
<td >asdfgasdg</td>
<td >asdgag</td>
<td >adfgag</td>
</tr>
<tr >
<td >3</td>
<td >asdfa</td>
<td >asdgad</td>
<td >asdga</td>
</tr>
<tr >
<td >3</td>
<td >asdaf</td>
<td >sdfasdf</td>
<td >adsadsf</td>
</tr>
<tr >
<td >4</td>
<td >dasfas</td>
<td >dasfgw</td>
<td>dfssg</td>
</tr>
<tr >
<td >4</td>
<td >sdfgsfg</td>
<td >sdfg</td>
<td >sdfg</td>
</tr>
<tr >
<td >5</td>
<td >dasfsa</td>
<td >adsf</td>
<td >gfrdhq</td>
</tr>
<tr>
<td>5</td>
<td>dfsgdsw</td>
<td >wyw</td>
<td >swrty</td>
</tr>
<tr >
<td >5</td>
<td >dasfasfs</td>
<td>dasgg</td>
<td >dfhdsh</td>
</tr>
<tr >
<td>5</td>
<td >dfsh</td>
<td>dfsh</td>
<td >dfsghds</td>
</tr>
</table>




Now I like to display my data like this


<table CELLSPACING="0" >

<tr>
<td>MY_ID</td>
<td>AAA</td>
<td>BBB</td>
<td>CCC</td>
</tr>

<tr>
<td rowspan="2" >1</td>
<td >aaa</td>
<td >asd</td>
<td >asfsaf</td>
</tr>
<tr >
<td >dasfaf</td>
<td >dfgsgh</td>
<td >dasfga</td>
</tr>
<tr >
<td >2</td>
<td >dfsgsdfg</td>
<td >dsgadfg</td>
<td >adsgasg</td>
</tr>
<tr>
<td rowspan="3" >3</td>
<td >asdfgasdg</td>
<td >asdgag</td>
<td >adfgag</td>
</tr>
<tr >
<td >asdfa</td>
<td >asdgad</td>
<td >asdga</td>
</tr>
<tr >
<td >asdaf</td>
<td >sdfasdf</td>
<td >adsadsf</td>
</tr>
<tr >
<td rowspan="2" >4&nbsp;</td>
<td >dasfas</td>
<td >dasfgw</td>
<td>dfssg</td>
</tr>
<tr >
<td >sdfgsfg</td>
<td >sdfg</td>
<td >sdfg</td>
</tr>
<tr >
<td rowspan="4" >5</td>
<td >dasfsa</td>
<td >adsf</td>
<td >gfrdhq</td>
</tr>
<tr>
<td>dfsgdsw</td>
<td >wyw</td>
<td >swrty</td>
</tr>
<tr >
<td >dasfasfs</td>
<td>dasgg</td>
<td >dfhdsh</td>
</tr>
<tr >
<td >dfsh</td>
<td>dfsh</td>
<td >dfsghds</td>
</tr>
</table>


Thanks!
P.S. How can I insert image in this post ?

Reply With Quote
  #2  
Old March 10th, 2008, 06:40 PM
BLarche BLarche is offline
Contributing User
ASP Free Expert (3500 - 3999 posts)
 
Join Date: Jan 2007
Location: Indianapolis, USA
Posts: 3,526 BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level)BLarche User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 14 h 19 m 5 sec
Reputation Power: 693
Good luck finding help with a question like that. I suggest you read the forum FAQ on how to post a question...

Reply With Quote
  #3  
Old April 19th, 2008, 10:15 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
SOme thing like this it have to be

Code:
do until rs.EOF%>


Quote:
Originally Posted by kom_s
Hi all!
Please help me to display my data from access DB.
I have query which gives my data like this


<table CELLSPACING="0" >

<tr>
<td>MY_ID</td>
<td>AAA</td>
<td>BBB</td>
<td>CCC</td>
</tr>

<tr>
<td >1</td>
<td >aaa</td>
<td >asd</td>
<td >asfsaf</td>
</tr>
<tr >
<td >1</td>
<td >dasfaf</td>
<td >dfgsgh</td>
<td >dasfga</td>
</tr>
<tr >
<td >2</td>
<td >dfsgsdfg</td>
<td >dsgadfg</td>
<td >adsgasg</td>
</tr>
<tr>
<td >3</td>
<td >asdfgasdg</td>
<td >asdgag</td>
<td >adfgag</td>
</tr>
<tr >
<td >3</td>
<td >asdfa</td>
<td >asdgad</td>
<td >asdga</td>
</tr>
<tr >
<td >3</td>
<td >asdaf</td>
<td >sdfasdf</td>
<td >adsadsf</td>
</tr>
<tr >
<td >4</td>
<td >dasfas</td>
<td >dasfgw</td>
<td>dfssg</td>
</tr>
<tr >
<td >4</td>
<td >sdfgsfg</td>
<td >sdfg</td>
<td >sdfg</td>
</tr>
<tr >
<td >5</td>
<td >dasfsa</td>
<td >adsf</td>
<td >gfrdhq</td>
</tr>
<tr>
<td>5</td>
<td>dfsgdsw</td>
<td >wyw</td>
<td >swrty</td>
</tr>
<tr >
<td >5</td>
<td >dasfasfs</td>
<td>dasgg</td>
<td >dfhdsh</td>
</tr>
<tr >
<td>5</td>
<td >dfsh</td>
<td>dfsh</td>
<td >dfsghds</td>
</tr>
</table>




Now I like to display my data like this


<table CELLSPACING="0" >

<tr>
<td>MY_ID</td>
<td>AAA</td>
<td>BBB</td>
<td>CCC</td>
</tr>

<tr>
<td rowspan="2" >1</td>
<td >aaa</td>
<td >asd</td>
<td >asfsaf</td>
</tr>
<tr >
<td >dasfaf</td>
<td >dfgsgh</td>
<td >dasfga</td>
</tr>
<tr >
<td >2</td>
<td >dfsgsdfg</td>
<td >dsgadfg</td>
<td >adsgasg</td>
</tr>
<tr>
<td rowspan="3" >3</td>
<td >asdfgasdg</td>
<td >asdgag</td>
<td >adfgag</td>
</tr>
<tr >
<td >asdfa</td>
<td >asdgad</td>
<td >asdga</td>
</tr>
<tr >
<td >asdaf</td>
<td >sdfasdf</td>
<td >adsadsf</td>
</tr>
<tr >
<td rowspan="2" >4&nbsp;</td>
<td >dasfas</td>
<td >dasfgw</td>
<td>dfssg</td>
</tr>
<tr >
<td >sdfgsfg</td>
<td >sdfg</td>
<td >sdfg</td>
</tr>
<tr >
<td rowspan="4" >5</td>
<td >dasfsa</td>
<td >adsf</td>
<td >gfrdhq</td>
</tr>
<tr>
<td>dfsgdsw</td>
<td >wyw</td>
<td >swrty</td>
</tr>
<tr >
<td >dasfasfs</td>
<td>dasgg</td>
<td >dfhdsh</td>
</tr>
<tr >
<td >dfsh</td>
<td>dfsh</td>
<td >dfsghds</td>
</tr>
</table>


Thanks!
P.S. How can I insert image in this post ?

Reply With Quote
  #4  
Old April 19th, 2008, 10:17 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
step 1

First you have to define the path of the database and the information


<%
DIM CONNECT,DBCONN,SQL
CONNECT="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/access_db/website.mdb")
Set DBCONN=Server.CreateObject("ADODB.Connection")
DBCONN.OPEN CONNECT
%>

Reply With Quote
  #5  
Old April 19th, 2008, 10:18 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
step 2

Define location and information on website
Code:
<%do until rs.EOF%>


Code:
<%do until rs.EOF%>
			<h1><% Response.write rs("info_title") %></h1>
<table border="0" width="500" height="154">

    <tr>
		<td width="251"><% Response.write rs("Info_description") %></td>
		<td><p><img src="<% Response.write rs("Info_image") %>" alt="" width="139" height="139" border="0" align="right" />					
    </tr>
    <tr>
       <td width="251"><br />	
         <a href="article.asp?info_id=<%=RS("info_id")%>">Read More</a></td></tr>
</table>
</table>
    <% rs.MoveNext%>
	<%loop %>

			<p>&nbsp;</p>


<%
rs.close
conn.close
%>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Please help to display data from DB


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!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

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





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek