I am trying to write out the results of a stored procedure in an HTML table, which takes the following format:
-----------------
A F K
B G L
C H M
D I N
E J O
------------------
Where each letter needs to sit in its own cell in the table. I'm finding it very difficult as HTML tables need to be written out horizontally then vertically. The only way I can think of doing it is to write each column as its own table, but I really need all results to sit in the same table for layout purposes.
Any ideas?
-Andrew
Rob says
use GETROWS() to convert to an array and the rest can be done with simple logic and a bit of math. like, across the top will be every 6th row...
I'm sure you get the idea..and will hopefully improve upon that..very basic idea.
David says
I thought it would be cool to make a subroutine to do this *automagically* based on how many columns you wanted to see, so you could change it whenever you wanted to. Omits blank trailing columns (unless over-ridden: see code for explanation)
Rob, you want to put this in your site somewhere?
' assume allData is a valid GetRows array
For TableColumns = 1 to 5
OutputVerticalDbTable allData, TableColumns, 0
Next
Response.End
will fix it up later tonight ...giving proper credits of course.
This conversation string was taken from the 15Seconds ASP Listserv on 1/18/01. If you have an ASP-related question or would like to share some of your knowledge with others, you may join the list by clicking here.
When errors occur on a Web site, they should be handled in a way that helps the user to get back on track. Unfortunately, setting up customized error pages in IIS usually requires something many Web developers lack -- access to and familiarity with the Web server's administrative interface. With CustomError for IIS, developers can add error pages, coded by hand or created in their favorite editor, by simply uploading them to a designated directory. No administrator intervention is required.
Automatic daily builds is a well known software engineering best practice. This article introduces a strategy for implementing and promoting daily builds and offers tips and tricks for preventing and fixing breaks. [Read This Article][Top]
Building an application can be more than pressing F5. With an increasing
number of quality packages being released, developers for the .NET platform now have options to create a very sophisticated build process. Aaron Junod describes a sample build environment and shows how a number of tools can work together to make reliable, predictable, and value-added builds. [Read This Article][Top]
This short article provides source code for a classic ASP online database functions testing application and shows how to configure and use the tool for either SQL Server or Oracle. [Read This Article][Top]
One of many improvements ASP.NET brings to the development table is in error handling. Adam Tuliper whips up a simple ASP.NET solution for handling those pesky and unexpected post-production errors. [Read This Article][Top]
Mansoor Ahmed Siddiqui explains debugging and tracing and shows how to create custom
trace listeners to help ensure hassle-free development. [Read This Article][Top]
Firing events on a Web server is an easy task. However most of the easy solutions require you to have your own dedicated IIS or SQL Server on the Internet to play with, a privilege not shared by many. In this article, Matthew Muller shows you how to get the same functionality in a shared hosting environment.
[Read This Article][Top]
Unlike programming inside a complete VB system, when using ByRef with ASP and COM, a complication arises because ASP's VBScript is not typed, but the component's VB is typed. This article will briefly explain how ByRef can be used with ASP and COM. [Read This Article][Top]
The script in Mark Newlands' article this week handles how errors are displayed and logged. It can capture all values in use at the time (e.g. form, querystring, session,and application level) and records them if you set a Boolean value to do so - displays custom HTML if required. Sends email, logs to database, and/or text file. [Read This Article][Top]
Transact-SQL provides developers with several database error-handling methods. Use these functions to efficiently handle database errors and add an extra level of data validation. This article discusses the @@ERROR, SP_ADDMESSAGE, and RAISERROR functions and provides examples on how to implement them.
[Read This Article][Top]
Mailing List
Want to receive email when the next article is published? Just Click Here to sign up.