Hello once again.
Now I am really frustrated. I have an asp page which queries an LDAP server...a simple select of some sort. select name, phonenum FROM "LDAP://dc..........." Select * from blah blah bla. Now the information that get's returned I store into hidden fields after looping. I am putting down the gist of the code
Now on my second page I request the form elements that I selected
Hopefully everyone is with me at this point.
Then I do a replace on the variable for my insert since each request is stored as a comman delimited string and then perform a split function
Now after this is where I have the problem..I do my loop
Well it does insert into the database however the data that gets insert is not correct for each user.
For example Paul and his phone number get inserted correctly but Mary get's Paul's phone number and Jim get's Mary's phone number and so forth. There is no correlation between name and phonenumber for each user. Any ideas what I should do? Could you please provide some code for a fix that will guide me in the right direction. If I can't see it visually I will not understand it. Thanks gurus.
Now I am really frustrated. I have an asp page which queries an LDAP server...a simple select of some sort. select name, phonenum FROM "LDAP://dc..........." Select * from blah blah bla. Now the information that get's returned I store into hidden fields after looping. I am putting down the gist of the code
Code:
name = objectrecordset.("name")
<input type = "Hidden" name = "Fname" value = "<%=Name%>">
phonenum = objectrecordset.("phoneNumber")
<input type = "Hidden" name = "Telephone" value = "<%=phonenum%>">
Now on my second page I request the form elements that I selected
Code:
FNameRequest = Request.form("Name")
PNumRequest = Request.form("phonenum")
Hopefully everyone is with me at this point.
Then I do a replace on the variable for my insert since each request is stored as a comman delimited string and then perform a split function
Code:
FullNameDesc = Replace(FNameRequest, "'", "''")
PNumDesc = Replace(PNumRequest , "'", "''")
strFName = Split(FullNameDesc,", ")
strPNum = Split(PNumDesc ,", ")
Now after this is where I have the problem..I do my loop
Code:
for i = 0 to ubound(strFName)
.....add insert statement here
Next
Well it does insert into the database however the data that gets insert is not correct for each user.
For example Paul and his phone number get inserted correctly but Mary get's Paul's phone number and Jim get's Mary's phone number and so forth. There is no correlation between name and phonenumber for each user. Any ideas what I should do? Could you please provide some code for a fix that will guide me in the right direction. If I can't see it visually I will not understand it. Thanks gurus.