OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Column Output help

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> Column Output help
Page: [1]
 
 
Athema

 

Posts: 5
Joined: 2/11/2009
Status: offline

 
Column Output help - 2/11/2009 16:01:36   
Hi there

I'm using MS frontpage 2003 and msaccess, I would like my database results to come out in 3 seperate columns instead of just 1, example below:

Column1 Column2 Column3
test1 test2 test3

As you may know it will only output in one column, can anyone help me please?

Thank you
TexasWebDevelopers

 

Posts: 761
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Column Output help - 2/11/2009 17:22:35   
http://www.texaswebdevelopers.com/examples/dbrows.asp

_____________________________

:)

Follow us on TWITTER

(in reply to Athema)
Athema

 

Posts: 5
Joined: 2/11/2009
Status: offline

 
RE: Column Output help - 2/12/2009 5:23:34   
Hi Travis

This is excatly what I want but I get a 500 internal server error when I modify the code, I basically created a new page and changed the database path and table names, below is the code I used:

<%
Option Explicit
Dim conn,strConn
Set conn = Server.CreateObject("ADODB.Connection")
strConn = "Provider=MICROSOFT.JET.OLEDB.4.0; " & "DATA SOURCE=" & Server.MapPath("_private/c2000.mdb")
conn.Open strConn
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
Dim strSQL
strSQL = "SELECT Field14,Field15 FROM c2000prods"

rs.Open strSQL, Conn
rs.MoveFirst
%>
<HTML><title>db rows and columns</title>
<BODY bgcolor="#FFFFFF">

<%
Response.Write("<TABLE WIDTH=""60%"" border=""0"" cellspacing=""0"" cellpadding=""3"">")
Response.Write("<TR>")
DIM i, cellString
i=1
Do until rs.EOF
cellString="<TD>" & rs("Field14") & "" & rs("Field15") & "<br>" & "</TD>"
if not i mod 3=0 then
response.write(cellString)
else
response.write(cellString)
Response.Write("</TR>")
Response.Write("<TR>")
end if
i=i+1
rs.movenext
loop
Response.Write("</Table>")
%>
</body>
</html>
<%
response.end
rs.close
set conn=nothing
%>


What am I doing wrong?

(in reply to Athema)
Athema

 

Posts: 5
Joined: 2/11/2009
Status: offline

 
RE: Column Output help - 2/12/2009 6:27:26   
Hi there

I have got it working but I would like the results to be hyperlinked, can you show me how to do that ?

Thank you

(in reply to Athema)
TexasWebDevelopers

 

Posts: 761
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Column Output help - 2/12/2009 9:29:42   
It depends on how you have the data stored in the database.
We generally store hyperlinks as text (long urls) and then call the text into hyperlink code.
Regular link= <a href="yourpage.asp">yourpage.asp</a>
If the hyperlink field is named "xhyperlink" then:
<a href="<%=xhyperlink%>" title="link description">Link text</a>
You can store the title tag (if used) and the link text as database fields also.
To use the url as the link text just add the field into the link code:
<a href="<%=xhyperlink%>"><%=xhyperlink%></a>

_____________________________

:)

Follow us on TWITTER

(in reply to Athema)
Page:   [1]

All Forums >> Web Development >> Microsoft FrontPage Help >> Column Output help
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts