passing array from componet to asp: cann't display all the infor from asp
Author |
Message |
weiw #1 / 6
|
 passing array from componet to asp: cann't display all the infor from asp
Hi all: i am trying to displaying AD attributes from component to asp, those attributes are hold in array. so far, got component works fine, however, when I display array on the asp page, some issue coming up, after i type the lastname from search page, if a user who has only that particular last name will display the infor I want. But If I want to display a number of users who share the same last name, it doesn't work instead it only show the last user's information. (for example, i have 1, 2, 3 users who share the same last name, logically, it should display all three, however, now, it only show the #3 's user information, anyone can solve this problem, i really appreciate I pasted the asp code below <% Dim LastName strLastName = request.form("lastname") %> <% Dim objReference Dim strMethodReturnPhone Set objReference = Server.CreateObject("PhoneSearch.phone") strMethodReturnPhone = objReference.PhoneDisplay(CStr(strLastName), aAccounts) Set objReference = Nothing %> <% intNumMatches = UBound(aAccounts, 2) - 1 For X = 0 To intNumMatches Next %> Name: <%=aAccounts(0,X)%><br> Telephone: <%=aAccounts(1,X)%><br> Department: <%=aAccounts(2,X)%>
|
Tue, 01 Mar 2005 01:52:36 GMT |
|
 |
JAM #2 / 6
|
 passing array from componet to asp: cann't display all the infor from asp
Am I missing something here? <% intNumMatches = UBound(aAccounts, 2) - 1 For X = 0 To intNumMatches Next %> Name: <%=aAccounts(0,X)%><br> Telephone: <%=aAccounts(1,X)%><br> Department: <%=aAccounts(2,X)%> Isn't that looping with nothing in the loop???? So you're breaking out of the loop and then displaying one set of details, which happens to match the last iteration ... <% intNumMatches = UBound(aAccounts, 2) - 1 For X = 0 To intNumMatches response.write "Name: " & aAccounts(0,X) & "<br>" Next %> etc
Quote: > Hi all: > i am trying to displaying AD attributes from component to asp, those > attributes are hold in array. so far, got component > works fine, however, when I display array on the asp page, some issue > coming up, after i type the lastname from search page, > if a user who has only that particular last name will display the > infor I want. > But If I want to display a number of users who share the same last > name, it doesn't work instead it only show the last user's > information. (for example, i have 1, 2, 3 users who share the same > last name, logically, it should display all three, however, > now, it only show the #3 's user information, > anyone can solve this problem, i really appreciate > I pasted the asp code below > <% > Dim LastName > strLastName = request.form("lastname") > %> > <% > Dim objReference > Dim strMethodReturnPhone > Set objReference = Server.CreateObject("PhoneSearch.phone") > strMethodReturnPhone = objReference.PhoneDisplay(CStr(strLastName), > aAccounts) > Set objReference = Nothing > %> > <% > intNumMatches = UBound(aAccounts, 2) - 1 > For X = 0 To intNumMatches > Next > %> > Name: <%=aAccounts(0,X)%><br> > Telephone: <%=aAccounts(1,X)%><br> > Department: <%=aAccounts(2,X)%>
|
Tue, 01 Mar 2005 02:06:13 GMT |
|
 |
weiw #3 / 6
|
 passing array from componet to asp: cann't display all the infor from asp
Quote:
> Am I missing something here? > <% > intNumMatches = UBound(aAccounts, 2) - 1 > For X = 0 To intNumMatches > Next > %> > Name: <%=aAccounts(0,X)%><br> > Telephone: <%=aAccounts(1,X)%><br> > Department: <%=aAccounts(2,X)%> > Isn't that looping with nothing in the loop???? So you're breaking out of > the loop and then displaying one set of details, which happens to match the > last iteration ... > <% > intNumMatches = UBound(aAccounts, 2) - 1 > For X = 0 To intNumMatches > response.write "Name: " & aAccounts(0,X) & "<br>" > Next > %> > etc
> > Hi all: > > i am trying to displaying AD attributes from component to asp, those > > attributes are hold in array. so far, got component > > works fine, however, when I display array on the asp page, some issue > > coming up, after i type the lastname from search page, > > if a user who has only that particular last name will display the > > infor I want. > > But If I want to display a number of users who share the same last > > name, it doesn't work instead it only show the last user's > > information. (for example, i have 1, 2, 3 users who share the same > > last name, logically, it should display all three, however, > > now, it only show the #3 's user information, > > anyone can solve this problem, i really appreciate > > I pasted the asp code below > > <% > > Dim LastName > > strLastName = request.form("lastname") > > %> > > <% > > Dim objReference > > Dim strMethodReturnPhone > > Set objReference = Server.CreateObject("PhoneSearch.phone") > > strMethodReturnPhone = objReference.PhoneDisplay(CStr(strLastName), > > aAccounts) > > Set objReference = Nothing > > %> > > <% > > intNumMatches = UBound(aAccounts, 2) - 1 > > For X = 0 To intNumMatches > > Next > > %> > > Name: <%=aAccounts(0,X)%><br> > > Telephone: <%=aAccounts(1,X)%><br> > > Department: <%=aAccounts(2,X)%>
so are you try to say that I am missing the loop in here. if so, can you give me some hints, please thanks wei
|
Tue, 01 Mar 2005 06:06:37 GMT |
|
 |
JAM #4 / 6
|
 passing array from componet to asp: cann't display all the infor from asp
I did ... look at my example code: Quote: > > <% > > intNumMatches = UBound(aAccounts, 2) - 1 > > For X = 0 To intNumMatches > > response.write "Name: " & aAccounts(0,X) & "<br>" > > Next > > %>
This only renders the names - but try it. Then add lines (inside the loop) for your other fields.
Quote: > > Am I missing something here? > > <% > > intNumMatches = UBound(aAccounts, 2) - 1 > > For X = 0 To intNumMatches > > Next > > %> > > Name: <%=aAccounts(0,X)%><br> > > Telephone: <%=aAccounts(1,X)%><br> > > Department: <%=aAccounts(2,X)%> > > Isn't that looping with nothing in the loop???? So you're breaking out of > > the loop and then displaying one set of details, which happens to match the > > last iteration ... > > <% > > intNumMatches = UBound(aAccounts, 2) - 1 > > For X = 0 To intNumMatches > > response.write "Name: " & aAccounts(0,X) & "<br>" > > Next > > %> > > etc
> > > Hi all: > > > i am trying to displaying AD attributes from component to asp, those > > > attributes are hold in array. so far, got component > > > works fine, however, when I display array on the asp page, some issue > > > coming up, after i type the lastname from search page, > > > if a user who has only that particular last name will display the > > > infor I want. > > > But If I want to display a number of users who share the same last > > > name, it doesn't work instead it only show the last user's > > > information. (for example, i have 1, 2, 3 users who share the same > > > last name, logically, it should display all three, however, > > > now, it only show the #3 's user information, > > > anyone can solve this problem, i really appreciate > > > I pasted the asp code below > > > <% > > > Dim LastName > > > strLastName = request.form("lastname") > > > %> > > > <% > > > Dim objReference > > > Dim strMethodReturnPhone > > > Set objReference = Server.CreateObject("PhoneSearch.phone") > > > strMethodReturnPhone = objReference.PhoneDisplay(CStr(strLastName), > > > aAccounts) > > > Set objReference = Nothing > > > %> > > > <% > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > For X = 0 To intNumMatches > > > Next > > > %> > > > Name: <%=aAccounts(0,X)%><br> > > > Telephone: <%=aAccounts(1,X)%><br> > > > Department: <%=aAccounts(2,X)%> > so are you try to say that I am missing the loop in here. if so, can > you give me some hints, please > thanks > wei
|
Tue, 01 Mar 2005 09:07:30 GMT |
|
 |
weiw #5 / 6
|
 passing array from componet to asp: cann't display all the infor from asp
Quote:
> I did ... look at my example code: > > > <% > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > For X = 0 To intNumMatches > > > response.write "Name: " & aAccounts(0,X) & "<br>" > > > Next > > > %> > This only renders the names - but try it. Then add lines (inside the loop) > for your other fields.
> > > Am I missing something here? > > > <% > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > For X = 0 To intNumMatches > > > Next > > > %> > > > Name: <%=aAccounts(0,X)%><br> > > > Telephone: <%=aAccounts(1,X)%><br> > > > Department: <%=aAccounts(2,X)%> > > > Isn't that looping with nothing in the loop???? So you're breaking out > of > > > the loop and then displaying one set of details, which happens to match > the > > > last iteration ... > > > <% > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > For X = 0 To intNumMatches > > > response.write "Name: " & aAccounts(0,X) & "<br>" > > > Next > > > %> > > > etc
> > > > Hi all: > > > > i am trying to displaying AD attributes from component to asp, those > > > > attributes are hold in array. so far, got component > > > > works fine, however, when I display array on the asp page, some issue > > > > coming up, after i type the lastname from search page, > > > > if a user who has only that particular last name will display the > > > > infor I want. > > > > But If I want to display a number of users who share the same last > > > > name, it doesn't work instead it only show the last user's > > > > information. (for example, i have 1, 2, 3 users who share the same > > > > last name, logically, it should display all three, however, > > > > now, it only show the #3 's user information, > > > > anyone can solve this problem, i really appreciate > > > > I pasted the asp code below > > > > <% > > > > Dim LastName > > > > strLastName = request.form("lastname") > > > > %> > > > > <% > > > > Dim objReference > > > > Dim strMethodReturnPhone > > > > Set objReference = Server.CreateObject("PhoneSearch.phone") > > > > strMethodReturnPhone = objReference.PhoneDisplay(CStr(strLastName), > > > > aAccounts) > > > > Set objReference = Nothing > > > > %> > > > > <% > > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > > For X = 0 To intNumMatches > > > > Next > > > > %> > > > > Name: <%=aAccounts(0,X)%><br> > > > > Telephone: <%=aAccounts(1,X)%><br> > > > > Department: <%=aAccounts(2,X)%> > > so are you try to say that I am missing the loop in here. if so, can > > you give me some hints, please > > thanks > > wei
JAM Thank you very much, I appreciate your help. wei
|
Tue, 01 Mar 2005 21:29:40 GMT |
|
 |
JAM #6 / 6
|
 passing array from componet to asp: cann't display all the infor from asp
np
Quote: > > I did ... look at my example code: > > > > <% > > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > > For X = 0 To intNumMatches > > > > response.write "Name: " & aAccounts(0,X) & "<br>" > > > > Next > > > > %> > > This only renders the names - but try it. Then add lines (inside the loop) > > for your other fields.
> > > > Am I missing something here? > > > > <% > > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > > For X = 0 To intNumMatches > > > > Next > > > > %> > > > > Name: <%=aAccounts(0,X)%><br> > > > > Telephone: <%=aAccounts(1,X)%><br> > > > > Department: <%=aAccounts(2,X)%> > > > > Isn't that looping with nothing in the loop???? So you're breaking out > > of > > > > the loop and then displaying one set of details, which happens to match > > the > > > > last iteration ... > > > > <% > > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > > For X = 0 To intNumMatches > > > > response.write "Name: " & aAccounts(0,X) & "<br>" > > > > Next > > > > %> > > > > etc
> > > > > Hi all: > > > > > i am trying to displaying AD attributes from component to asp, those > > > > > attributes are hold in array. so far, got component > > > > > works fine, however, when I display array on the asp page, some issue > > > > > coming up, after i type the lastname from search page, > > > > > if a user who has only that particular last name will display the > > > > > infor I want. > > > > > But If I want to display a number of users who share the same last > > > > > name, it doesn't work instead it only show the last user's > > > > > information. (for example, i have 1, 2, 3 users who share the same > > > > > last name, logically, it should display all three, however, > > > > > now, it only show the #3 's user information, > > > > > anyone can solve this problem, i really appreciate > > > > > I pasted the asp code below > > > > > <% > > > > > Dim LastName > > > > > strLastName = request.form("lastname") > > > > > %> > > > > > <% > > > > > Dim objReference > > > > > Dim strMethodReturnPhone > > > > > Set objReference = Server.CreateObject("PhoneSearch.phone") > > > > > strMethodReturnPhone =
objReference.PhoneDisplay(CStr(strLastName), Quote: > > > > > aAccounts) > > > > > Set objReference = Nothing > > > > > %> > > > > > <% > > > > > intNumMatches = UBound(aAccounts, 2) - 1 > > > > > For X = 0 To intNumMatches > > > > > Next > > > > > %> > > > > > Name: <%=aAccounts(0,X)%><br> > > > > > Telephone: <%=aAccounts(1,X)%><br> > > > > > Department: <%=aAccounts(2,X)%> > > > so are you try to say that I am missing the loop in here. if so, can > > > you give me some hints, please > > > thanks > > > wei > JAM > Thank you very much, I appreciate your help. > wei
|
Tue, 01 Mar 2005 21:56:37 GMT |
|
|
|