 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 6th, 2004, 10:47 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Loading query data onto ASP page
Hi, all,
I'm trying to display a SQL query result on my ASP page. The results may have different numbers of rows AND different sets of columns each time the page is accessed.
What's the 'normal' or 'popular' way of doing this? I've heard about different kinds of grids (DBGrid, Data Grid, Flex Grid), but know little about them. I need to have scroll bars (horizontal and vertical), as well as the usual headings, etc.
Other than grids, I am also thinking about using spreadsheet from Microsoft's Office Web Component.
Any one has experience or knowledge in this?
Thanks.
|
|

October 6th, 2004, 05:30 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
It is better to use Datagrid. With this All the colums will be displyed at the top and all other rows will be displayed below the headings. Even if the number of records increase a scroll bar will appear for the records keeping the column headings as it is.
for this use one table for headings.
And display records in a table and keep this table in <div> tag.
Thnaks
Suresh
|
|

October 6th, 2004, 08:20 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hello,
The better way to achieve your output is...
use table and some recordset properties.
generate a table on th fly. To display field names on the header section, loop thru Recordset.fields.count and display the field name by Recordset.fields(counter).name
to display the value of a field, Recordset.fields(counter)
This will work for any query having any fields.
------------
Rajani
|
|

October 6th, 2004, 08:23 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Oh!
To display scroll bars(horizontal and vertical), use CSS
|
|

October 7th, 2004, 07:15 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
So, grid or table, which is better? =)
Grid seems to have less work, and table gives you more control? Any one with expereince in OWC spreadsheet?
Thanks
|
|

October 7th, 2004, 08:09 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hello,
Table is good. Coz grid is control. It is not supported by all browsers. You need to have some extra things to use grid.
Table is browser independent.
---------
Rajani
|
|

October 8th, 2004, 07:16 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the extra info. After more thoughts on this, I am now playing with spreadsheet from office web components (OWC), which I have a bit experience, since this is for accouting/financial people to use, and I need a function to export the result to Excel. OWC is good, but it seems to me too few people use it, thus too little community support. =(
Thanks for all your answers.
|
|

October 12th, 2004, 02:24 PM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How do you use DataGrid on 'Classic' ASP? It seems to me, everywhere I look, it's about DataGrid on ASP.NET? I need to know if I can load DataDrid from recordsets.
Thanks.
|
|

October 12th, 2004, 10:13 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I haven't heard anyone used Datagrid in "Classic ASP". It's got to do with .Net
_________________________
- Vijay G
Strive for Perfection
|
|

October 13th, 2004, 07:33 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am trying several methods to best fit my need to display recordsets with possibly thousands of rows on an intranet web page.
I used spreadsheet (OWC 11), which looks real look and professional, but I heard spreadsheet is slow when storing thousands of rows and it is extremely slow when getting out of that particluar web page.
I also used simple HTML table, it is good but doesn't have all the fancy functions I hope to have. But it is faster, in and out.
I am looking something like a grid (in classic ASP) to have the best of both worlds - fast enough and with reasonable functions.
After going almost to the end of the internet, I think it is not easy to do this.
|
|
 |