Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 6th, 2004, 10:47 AM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Reply With Quote
  #2 (permalink)  
Old October 6th, 2004, 05:30 PM
Friend of Wrox
 
Join Date: Sep 2004
Location: Hyderabad, Andhra Pradesh, India.
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sureshbabu Send a message via Yahoo to sureshbabu
Default

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


Reply With Quote
  #3 (permalink)  
Old October 6th, 2004, 08:20 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

Reply With Quote
  #4 (permalink)  
Old October 6th, 2004, 08:23 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Oh!

 To display scroll bars(horizontal and vertical), use CSS


Reply With Quote
  #5 (permalink)  
Old October 7th, 2004, 07:15 AM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #6 (permalink)  
Old October 7th, 2004, 08:09 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

Reply With Quote
  #7 (permalink)  
Old October 8th, 2004, 07:16 AM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


Reply With Quote
  #8 (permalink)  
Old October 12th, 2004, 02:24 PM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
  #9 (permalink)  
Old October 12th, 2004, 10:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I haven't heard anyone used Datagrid in "Classic ASP". It's got to do with .Net

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #10 (permalink)  
Old October 13th, 2004, 07:33 AM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using ORDER BY in SQL query in ASP page saifi4u Classic ASP Databases 1 February 29th, 2008 09:19 AM
Loading HTML pages into an ASP.NET page Dsypher ASP.NET 2.0 Basics 4 May 17th, 2007 07:21 AM
ASP page not loading correctly phreakgrrrl Classic ASP Databases 1 July 6th, 2005 02:59 PM
Loading XML from internet on ASP page Rustam_pascal XML 0 March 2nd, 2005 07:49 AM
Getting data to ASP page askenkray Classic ASP Components 0 January 13th, 2005 01:08 AM



All times are GMT -4. The time now is 09:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.