|
| |
|
|
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
|
|
|
|
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?
|
|
|
|
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
|
|
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
|
|
|