<% 'Open up connection to database... Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open "DSN=re1m" 'Create a recordset object and grab a query Dim objRS Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open "SELECT * FROM re1staff", objConn 'Create an Array variable and use GetRows Dim aArray aArray = objRS.GetRows() 'iRows = Ubound(aArray,2) 'iColumns = Ubound(aArray,1) 'response.write(iRows) 'response.write(iColumns) 'Clean up... objRS.Close Set objRS = Nothing objConn.Close Set objConn = Nothing %> Real Estate One - Midland TX - Our Realtors <% 'Get the upper and lower bounds from the second 'dimension (the row count)... also, create a temporary 'array, aTmpArray, to hold the reordered values Dim iCount, aTmpArray iCount = UBound(aArray, 2) ReDim aTmpArray(UBound(aArray, 1), UBound(aArray, 2)) Dim iLoop, strIndex, iUpper, iLower iLower = LBound(aArray, 2) For iLoop = iLower to iCount strIndex = strIndex & CStr(iLoop) If iLoop < iCount then strIndex = strIndex & "," Next 'Choose a Random Index Randomize Timer Dim iRnd, aTmp, iTmpUpper, strNewIndex, iInnerLoop Redim aTmp(iCount) 'Loop through the array For iLoop = iLower to iCount iTmpUpper = iCount - iLoop 'Rebuild aTmp, the array of indexes ReDim Preserve aTmp(iTmpUpper) aTmp = split(strIndex, ",") 'Add an element to the temp array... iRnd = Int(Rnd * (iTmpUpper + 1)) For iInnerLoop = LBound(aArray,1) to UBound(aArray,1) aTmpArray(iInnerLoop, iLoop) = aArray(iInnerLoop, aTmp(iRnd)) Next 'Compact aTmp, the array of indexes aTmp(iRnd) = aTmp(iTmpUpper) ReDim Preserve aTmp(iTmpUpper - 1) strIndex = join(aTmp, ",") Next ReOrderArray2D = aTmpArray %>
Each of our professionals are actually broker/owner/partners within the Real Estate One firm.  As individual operators, each can contribute to the whole by promoting a higher number of repeat customers and contributing to the office an extensive referral network. 

MEET US:

<% if isarray(aTmpArray) then for j = 0 to UBound(aTmpArray, 2) %> <% next end if %>

<% if aTmpArray(14,j) <> "" then %> <% else end if%> <% if aTmpArray(5,j) <> "" then %> <% else end if%>

<%if aTmpArray(14,j) <> "" then %> <%else end if%>
 <%=aTmpArray(1,j)%> <%=aTmpArray(2,j)%> - <%=aTmpArray(4,j)%>
 w: > <%=aTmpArray(14,j)%>
 e: <%=aTmpArray(3,j)%>
 cell: <% sAreaCode = mid(aTmpArray(7,j),1,3) sPhonePrefix = mid(aTmpArray(7,j),4,3) sPhoneSuffix = mid(aTmpArray(7,j),7,4) sAgentCell = sAreaCode & "." & sPhonePrefix & "." & sPhoneSuffix Response.Write sAgentCell %> ofc: <%if aTmpArray(10,j) <> "" then sAreaCode = mid(aTmpArray(10,j),1,3) sPhonePrefix = mid(aTmpArray(10,j),4,3) sPhoneSuffix = mid(aTmpArray(10,j),7,4) sAgentOffice = sAreaCode & "." & sPhonePrefix & "." & sPhoneSuffix Response.Write sAgentOffice %> ext: <%=aTmpArray(11,j)%> <% else end if%>
 home: <%if aTmpArray(8,j) <> "" then sAreaCode = mid(aTmpArray(8,j),1,3) sPhonePrefix = mid(aTmpArray(8,j),4,3) sPhoneSuffix = mid(aTmpArray(8,j),7,4) sAgentHome = sAreaCode & "." & sPhonePrefix & "." & sPhoneSuffix Response.Write sAgentHome else end if %> direct: <%if aTmpArray(12,j) <> "" then sAreaCode = mid(aTmpArray(12,j),1,3) sPhonePrefix = mid(aTmpArray(12,j),4,3) sPhoneSuffix = mid(aTmpArray(12,j),7,4) sAgentDirect = sAreaCode & "." & sPhonePrefix & "." & sPhoneSuffix Response.Write sAgentDirect else end if %>
 fax: <%if aTmpArray(9,j) <> "" then sAreaCode = mid(aTmpArray(9,j),1,3) sPhonePrefix = mid(aTmpArray(9,j),4,3) sPhoneSuffix = mid(aTmpArray(9,j),7,4) sAgentFax = sAreaCode & "." & sPhonePrefix & "." & sPhoneSuffix Response.Write sAgentFax else end if %> toll free: <%if aTmpArray(13,j) <> "" then sAreaCode = mid(aTmpArray(13,j),1,3) sPhonePrefix = mid(aTmpArray(13,j),4,3) sPhoneSuffix = mid(aTmpArray(13,j),7,4) sAgentTollFree = "1." & sAreaCode & "." & sPhonePrefix & "." & sPhoneSuffix Response.Write sAgentTollFree else end if %>

Home | Contact | Privacy Policy | Feedback