Professional Web Applications Themes

Help on ASP! Pull data from database and display in certain format. - ASP

Hi expert please help with below coding. Basically I want to display the database data (jobaidSubject) by grouping them under a header (jobaidCategory). Example under a table 'Bills of Material' header should list all the subjects, then in next table 'Configurator Developer' table, should list all the subjects under that header and so forth. My coding below didn't obtain the result I want, can help? See snapshot, the outcome from below coding. Coding: <% set conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.ACE.OLEDB.12.0" conn.open(server.mappath("dbSCOFKE.accdb")) set rs=Server.CreateObject("ADODB.Recordset") rs.open "Select * from tbJobaid order by jobaidCategory asc, jobaidSubject asc", conn ncount = 1 do until rs.EOF response.write("<TABLE cellSpacing=0 ...

  1. #1

    Default Help on ASP! Pull data from database and display in certain format.

    Hi expert please help with below coding. Basically I want to display the database data (jobaidSubject) by grouping them under a header (jobaidCategory). Example under a table 'Bills of Material' header should list all the subjects, then in next table 'Configurator Developer' table, should list all the subjects under that header and so forth.

    My coding below didn't obtain the result I want, can help? See snapshot, the outcome from below coding.

    Coding:
    <%


    set conn=Server.CreateObject("ADODB.Connection")
    conn.provider="Microsoft.ACE.OLEDB.12.0"
    conn.open(server.mappath("dbSCOFKE.accdb"))
    set rs=Server.CreateObject("ADODB.Recordset")
    rs.open "Select * from tbJobaid order by jobaidCategory asc, jobaidSubject asc", conn


    ncount = 1

    do until rs.EOF

    response.write("<TABLE cellSpacing=0 cellPadding=3 width=100% style='position:relative;border:1px solid #696969'><TBODY><TR><TD class='eg-bar'>" &_
    "<span id='faql" & ncount & "-title' class='iconspan'><IMG src='images\picPlus.gif'></span>" &_
    "<FONT face='Arial Black' size=3 color=#696969>&nbsp;&nbsp;" & rs("jobaidCategory") & "</FONT></TD></TR><TR><TD class='eg-bar2'>" &_
    "<div id='faql" & ncount & "' class='icongroup1'>" &_
    "<LI><A href='" & rs("jobaidURL") & "'>" & rs("jobaidSubject") & "</A></LI></div></TD></TR></TBODY></TABLE><BR><BR>")

    ' next
    ncount = ncount + 1

    rs.MoveNext

    loop
    rs.close
    conn.close

    %>
    Attached Images Attached Images
    littlelamb is offline Junior Member
    Join Date
    Apr 2011
    Location
    Malaysia
    Posts
    2

Similar Threads

  1. Replies: 3
    Last Post: October 5th, 04:43 AM
  2. i want to display all the data in the database to the text field
    By binglee17@gmail.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: June 23rd, 05:57 AM
  3. format display from database field
    By JoyRose in forum Macromedia ColdFusion
    Replies: 4
    Last Post: June 7th, 09:06 PM
  4. Data format and display
    By Josué Maldonado in forum PostgreSQL / PGSQL
    Replies: 3
    Last Post: January 22nd, 07:58 PM
  5. Replies: 1
    Last Post: July 23rd, 05:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139