Ask a Question related to ASP Database, Design and Development.
-
Targa #1
Increment row number starting at 1
I have an asp page which displays database results in a table - (this is an
invoice page).
I have a variable called Row_Num which stores the row ID. Each time I add an
item, I need the Row_Num var to increment by 1.
SELECT Item_Desc,Item_Price FROM Line_Items WHERE OrderNum = 00123
Row 1 Item Qty Price Subtotal
Row 2 Item Qty Price Subtotal
Row 3 Item Qty Price Subtotal
Row 4 Item Qty Price Subtotal
There is also an option to delete a row so the Row_Num var would need to be
adjusted - say I deleted Row 2, Row 3 would need to change to Row 2 and Row
4 would change to Row 3 in order to keep the correct number of rows.
Im stuck on the incrementing part.
I think I need a loop to the incrememnting but am not sure how to do it.
Any help greatly appreciated.
Thanks!
Targa Guest
-
Access update, CFLOOP, number increment
I have a table with four columns. field0 | field1 | field3 | field10 (primary key) L ABC 101 ... -
Change starting page number
Hello--I am working on a large document that must be broken into pieces for multiple users to work on. I need to number the pages of these... -
#25626 [Opn->Bgs]: Variables containing number starting with 0 (Zero) become 0 (Zero)
ID: 25626 Updated by: sniper@php.net Reported By: sameh dot attia at tedata dot net -Status: Open +Status: ... -
Auto Increment a number field
I have a memo field (History) and a number field (Count). What I require is that when the history field is updated then the count field will... -
Increment a number in a text field
I'm having problems getting a text field to automatically increment, exp. when you add a record to a form, it should automatically give a new id... -
Targa #2
Re: Increment row number starting at 1
Got it figured out - thanks.
<% Do While Not RS.EOF %>
<% Row_Num = Row_Num + 1 %>
<tr>
<td><% response.write Row_Num %></td>
<td><%=RS("Item_Desc")%></td>
<td><%=RS("Item_Price ")%></td>
<td><%=RS("Item_Qty")%></td>
<td>SubtotalFuntion</td>
</tr>
"Targa" <targa1SPAMSUCKS@alltel.net> wrote in message
news:eRcETkFSEHA.3708@TK2MSFTNGP10.phx.gbl...an> I have an asp page which displays database results in a table - (this isan> invoice page).
> I have a variable called Row_Num which stores the row ID. Each time I addbe> item, I need the Row_Num var to increment by 1.
>
> SELECT Item_Desc,Item_Price FROM Line_Items WHERE OrderNum = 00123
>
> Row 1 Item Qty Price Subtotal
> Row 2 Item Qty Price Subtotal
> Row 3 Item Qty Price Subtotal
> Row 4 Item Qty Price Subtotal
>
> There is also an option to delete a row so the Row_Num var would need toRow> adjusted - say I deleted Row 2, Row 3 would need to change to Row 2 and> 4 would change to Row 3 in order to keep the correct number of rows.
>
> Im stuck on the incrementing part.
> I think I need a loop to the incrememnting but am not sure how to do it.
> Any help greatly appreciated.
>
> Thanks!
>
>
>
Targa Guest



Reply With Quote

