OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Display Specefic Records on Recordset

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Display Specefic Records on Recordset
Page: [1]
 
dzirkelb1

 

Posts: 1433
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
Display Specefic Records on Recordset - 9/14/2009 12:50:39   
set rs = Server.CreateObject ("adodb.Recordset")
ssql = "SELECT [QUOTES DETAIL].QteLineSerialNbr, [QUOTES DETAIL].[NC/NR] AS NCNR, [QUOTES DETAIL].[QUOTE #], [QUOTES DETAIL].QTY, [QUOTES DETAIL].[CUST ITEM #] AS CustItem, [QUOTES DETAIL].MFG, [QUOTES DETAIL].[PART #] AS PartNum, [QUOTES DETAIL].PRICE, [QUOTES DETAIL].UM, [QUOTES DETAIL].[DEE COST] AS DeeCost, [QUOTES DETAIL].DELIVERY, [QUOTES DETAIL].NOTES, [QUOTES DETAIL].SOURCE, [QUOTES DETAIL].WIN, [QUOTES DETAIL].INTNOTE, [QUOTES DETAIL].TAG, [QUOTES DETAIL].MARK_UP, [QUOTES DETAIL].MinQty, [QUOTES DETAIL].StdPkgQty, [QUOTES DETAIL].[NC/NR], [QUOTES DETAIL].PriceBreakInfo, [QUOTES DETAIL].SEQ, [QUOTES DETAIL].CustMinQty, [QUOTES DETAIL].CustMultQty, [QUOTES DETAIL].VenMarginRating, [QUOTES DETAIL].VendorID, [QUOTES DETAIL].MfgOrderFrequencyInfo, [QUOTES DETAIL].CurrentBiz, INVENTORYMASTER1.OH, INVENTORYMASTER1.OO, INVENTORYMASTER1.SCHDOO, INVENTORYMASTER1.[90DayUsage] AS NinetyDay, [QUOTES DETAIL].PartID AS PartID, [QUOTES DETAIL].NCPipelineQty, [QUOTES DETAIL].NCWindowDays, [QUOTES DETAIL].InvCode, [QUOTES DETAIL].TotQty, [QUOTES DETAIL].Turns, [QUOTES DETAIL].FacMin, [QUOTES DETAIL].[Frt%] AS FrtPer, [QUOTES DETAIL].Schd, [QUOTES DETAIL].TargetPrice, [QUOTES DETAIL].WgtFctr, [QUOTES DETAIL].OrderQty, INVENTORYMASTER1.BestSplCost, INVENTORYMASTER1.BestSplEndDt, [DEE COST]*[TotQty] AS ExtendedCost"
ssql = ssql & " FROM [QUOTES DETAIL] LEFT JOIN INVENTORYMASTER1 ON [QUOTES DETAIL].PartID = INVENTORYMASTER1.ID"

if len(intQteLineSerialNbr) > 0 then
	ssql = ssql & " WHERE ([QUOTES DETAIL].QteLineSerialNbr = "&intQteLineSerialNbr&")"
else
	ssql = ssql & " WHERE ([QUOTES DETAIL].[QUOTE #] = "&intQuoteNum&")"	
end if

ssql = ssql & " ORDER BY "&strSortColumn&""

rs.Open ssql, dbc, adOpenForwardOnly, adLockReadOnly

for r = 10 to 20
   display 10th to 20th records
next


How do I do the "display 10th to 20th records" in the above code?
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Display Specefic Records on Recordset - 9/14/2009 15:41:37   
It's like setting up pagination:
http://www.asp101.com/articles/recordsetpaging/index.asp

'Grab a record count:
intRecordCount = rs.RecordCount
'Then iterate through:
For intRecordCount = 10 to 20
response.write("whatever")
rs.MoveNext
If rs.EOF Then Exit for
Next

The errors come when the parameters are before or beyond the recordset.
The link above will give you the code to workaround.



_____________________________

:)

Follow us on TWITTER

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1433
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: Display Specefic Records on Recordset - 9/14/2009 16:51:14   
I was able to use this information and get what I needed to work..thanks!

(in reply to TexasWebDevelopers)
crede123

 

Posts: 1
Joined: 9/19/2009
Status: offline

 
RE: Display Specefic Records on Recordset - 9/19/2009 9:31:42   
I was also able to use this information but once i click "AGAIN" an button or link, it will display database error.
why is that?
i am using PHP and MySQL...

Credit Card Consolidation

(in reply to dzirkelb1)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Display Specefic Records on Recordset - 9/19/2009 10:20:44   
Without seeing code it's hard to tell..but the example was ASP on Access and that code won't work with PHP on mysql.
I'm a .NET/classic ASP guy anyway but someone here can help with PHP if you provide the code and specific error messages and line numbers.

_____________________________

:)

Follow us on TWITTER

(in reply to crede123)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Display Specefic Records on Recordset
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts