a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

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

Search Forums
 

Advanced search
Recent Posts

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

 

using get rows instead

 
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 and Database >> using get rows instead
Page: [1]
 
seth

 

Posts: 312
From: canada
Status: offline

 
using get rows instead - 10/5/2006 16:57:16   
I have an asp page that has many blocks of code, i'm interested in changing the record set usage to getRows method. I've read a bit on getRows and have a little understanding on it. I hoping that i'll be able to learn the rest by example. Below is one of the chunks of code that uses the RS, I was wondering if someone can convert it to get row for me so i can study the difference and apply the methodologies to the rest of the asp code blocks on the page and also throughout the entire site, thanks very much!

	Set objInvRS = objConn.Execute(strSQL)
	
	
	If Not objInvRS.EOF Then
		varInvRSInventoryID = CLng(objInvRS("InventoryID"))
		varInvRSDate = CDate(objInvRS("InventoryDate"))
		varInvRSAvailable = CLng(objInvRS("Available"))
		varInvRSReservationID = objInvRS("ReservationID")
		varInvRSProductID = CLng(objInvRS("ProductID"))
	End If
	
	
	For intProductIndex = 0 To (intProductCount - 1) Step 2
		rowProductID = arrProduct(intProductIndex)
		Response.Write "<tr id='" & rowProductID & "'>"
		
		' write the Product Label cell
		Response.Write "<td nowrap class='" & strProductClass & "' title='" & arrProduct(intProductIndex + 1) & "'>"
		Response.Write "<div style='width:145px;overflow-x:hidden' class='" & strProductClass & "' > "
		Response.Write arrProduct(intProductIndex + 1)
		Response.Write "</div>"
		Response.Write "</td>"
			
		Response.Write "<td></td><td></td>"
		objDate = objMinDate
		Do Until objDate > objMaxDate
			Response.Write "<td"
			If objInvRS.EOF Then
				Response.Write " class='invCellNone'>"
			ElseIf rowProductID = varInvRSProductID And varInvRSDate = objDate Then
				If varInvRSAvailable > 0 Then
					' There is available inventory here
					Response.Write " id='inv" & varInvRSInventoryID & "'"
					Response.Write " class='invCellAvl' onMouseOver='selectInv(this)' onMouseDown='selectFirstInv(this)'>"
					If blnIsHotelMode Then Response.Write varInvRSAvailable
				Else
					' Inventory here but it is sold
					Response.Write " id='res" & varInvRSReservationID & "'"

					If blnIsHotelMode Then 
						Response.Write " class='invCellAvlBooked'>0"	
					Else
						Response.Write " onClick='selectReservation(" & varInvRSReservationID & ")'"
						Response.Write " class='invCellAvlBooked'>"	
					End If					
				End If
				objInvRS.moveNext
				If Not objInvRS.EOF Then
					varInvRSProductID = objInvRS("ProductID")
					varInvRSDate = CDate(objInvRS("InventoryDate"))
					varInvRSAvailable = objInvRS("Available")
					varInvRSInventoryID = objInvRS("InventoryID")
					varInvRSReservationID = objInvRS("ReservationID")
				End If
			Else
				' No Inventory for this date and product
				Response.Write " class='invCellNone'>"
			End If
			
			Response.Write "</td><td></td>"
			objDate = DateAdd("d",1,objDate)
		Loop
		Response.Write "</tr>"
		Response.Write "<tr><td colspan='" & intColspan & "'><IMG SRC='../img/transparent.gif' width='1' height='1'></td></tr>"

	Next
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> using get rows instead
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