If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > database info- can view in asp but html table??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-09, 17:53
MizzHellz MizzHellz is offline
Registered User
 
Join Date: Jan 2009
Posts: 6
Question database info- can view in asp but html table??

hey,
Ive created a database with several fields. I have uploaded the database and am able to show the information in a asp page. Can anyone help me out with how to get it to show in a html table instead? the code i currently have is:

<% Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" &_
"DBQ=" & Server.MapPath("\ssp08\storer\shop.mdb")
objConn.Open

Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "shop", objConn, , , adCmdTable
%>

<table>
<tr><td> <% Response.Write objRS("Price")%></td></tr>
<tr><td><% Response.Write objRS("Description)%></td></tr>
</table>

<%
objRS.close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
Reply With Quote
  #2 (permalink)  
Old 01-08-09, 18:33
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
You have to loop through your recordset...

Have a look at the examples here: ADO Display

Let us know how you get on
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 01-08-09, 18:33
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
P.S. please don't post the same question twice! Just so you know, I've deleted your duplicated thread
__________________
George
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On