If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > reading from sql table ...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-03, 16:11
Chauzer Chauzer is offline
Registered User
 
Join Date: Dec 2003
Posts: 41
reading from sql table ...

hi i'm new to sql and asp and just most database stuff... right now... i have an asp page which loads a default html page...

in the html page, there's a section where it reads from an sql database and reads the row/columns and returns it all in a table thats displayed in html on the page... in the table in sql.. theres about 600 rows.. but i have it split up sort of.. like for rows 1-100 i made a column called row_id and i have that as 1 for rows 1-199... then for rows 200-299 the row_id for all those rows is 2, and so on... is there a way in my html code to retrieve only certain rows given the row_id, say i only want to display rows 200-299 and i have the row_id 2, is there a way to display just those rows instead of the whole table of 600 rows?

here is the code that reads sql table and shows it in html on a webpage, this code returns the whole table:

Code:
<czpage Project_Numbers Project everybody>
  <czdataset thisuser msaccess users query "select * from users where username = '%' " "user_id,username" "archuser:username" >
  <czdataset tnumbers intranet chargenumbers query "select * from chargenumbers order by task_number" "charge_id,project,task_number,description,project_id" "*:*" >
<czbody>
  <czelement botmenu>
  <center>
     <table bgcolor="F0FFE0"><tr bgcolor="E0EEC0">
       <td><b>Charge ID</b></td>
       <td><center><b>Project</b></center></td>
       <td><b>Task Number</b></td>
       <td><b>Description</b></td>
       <td><b>Project ID</b></td></tr>
       <tr bgcolor="E0EEC0">
       <czform settasknums tnumbers charge_id multi>
       <td><czlink Tnumber_Detail "bluedot.gif" image withkey tnumbers charge_id popup 400 650 >
       <czfield tnumbers charge_id r></td>
       <td><czfield tnumbers project w small></td>
       <td><czfield tnumbers task_number w ></td>
       <td><czfield tnumbers description w large>
       <td><czfield tnumbers project_id w small><czsubmit write></td>
       <czinterform></tr><tr bgcolor="E0EEC0"></czform>
     </tr></table>
  </center>
  <czelement botfoot>
</czbody>
</czpage>
chargenumbers is the name of the table,
charge_id,project,task_number,description,project_ id are the name of the columns... right now i added an extra column called row_id and i want to be able to display only the rows that have a certain row_id..

can anyone help please?
(sorry for the long post)
Reply With Quote
  #2 (permalink)  
Old 12-01-03, 17:41
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
in the same way that you have

Code:
<czpage Project_Numbers Project everybody>
  <czdataset thisuser msaccess users query "select * from users where username = '%' " "user_id,username" "archuser:username" >
...............
can you have...


Code:
<czpage Project_Numbers Project everybody>
  <czdataset thisuser msaccess users query "select * from users where username = '%' and row_id='%' " "user_id,username" "archuser:username"  "row_id" "archrow_id" >
...............
I'm not sure on the exact sytnax for this, I've never done it this way myself...
Reply With Quote
  #3 (permalink)  
Old 12-03-03, 23:39
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Are you submitting back to this page to return the remaining results ? And what is the syntax for czdataset ?
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On