Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems. -
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
-
response.write sSql & "<BR>"
-
Next
-
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info. 9 2143
when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order.
You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more
explicit in naming form fields to create the desired association.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems.
-
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
response.write sSql & "<BR>"
-
Next
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote:
when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order.
You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more
explicit in naming form fields to create the desired association.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems. -
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
-
response.write sSql & "<BR>"
-
Next
-
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote:
>when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order. You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more explicit in naming form fields to create the desired association. "MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems.
-
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
response.write sSql & "<BR>"
-
Next
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
That's exactly what I did as noted in the code shown.
Jon Paal wrote:
give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote:
when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order.
You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more
explicit in naming form fields to create the desired association.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems. -
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
-
response.write sSql & "<BR>"
-
Next
-
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
if it is unique then why are you splitting it ?
"MrHelpMe" <cl********@hotmail.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
That's exactly what I did as noted in the code shown.
Jon Paal wrote:
>give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote: when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order. You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more explicit in naming form fields to create the desired association. "MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems.
-
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
response.write sSql & "<BR>"
-
Next
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
What is happening is the data is being returned from a select on an
LDAP server. Then I am looping thorugh the recordeset and returning the
objectrecordset of each field. What I am left with is for each field I
have a string of comma separated list that I would need to split so
that is why.
I Jon Paal wrote:
if it is unique then why are you splitting it ?
"MrHelpMe" <cl********@hotmail.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
That's exactly what I did as noted in the code shown.
Jon Paal wrote:
give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote:
when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order.
You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more
explicit in naming form fields to create the desired association.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems. -
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
-
response.write sSql & "<BR>"
-
Next
-
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
I can only cvomment based upon what you have provided. Your code indicates it is coming from a form ("request.form").
You can't allow multiple select of names and multiple select of emails and somehow hope they correspond to each other in the correct
order.
there is nothing unique here, there is a collection of values which are split.
FullName=Request.Form("Name")
FullNameDesc = Replace(FullName, "'", "''")
strFullName = Split(FullNameDesc,", ")
the resulting strFullName array is not likely to match with resulting array of emails in the correct order.
you either need to have unique names or an association value to correlate name with the intended email etc.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@i42g2000cwa.googlegr oups.com...
What is happening is the data is being returned from a select on an
LDAP server. Then I am looping thorugh the recordeset and returning the
objectrecordset of each field. What I am left with is for each field I
have a string of comma separated list that I would need to split so
that is why.
I Jon Paal wrote:
>if it is unique then why are you splitting it ?
"MrHelpMe" <cl********@hotmail.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
That's exactly what I did as noted in the code shown.
Jon Paal wrote: give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote: when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order. You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more explicit in naming form fields to create the desired association. "MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems.
-
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
response.write sSql & "<BR>"
-
Next
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
Jon,
I do see what you mean but not understanding how to fix this with code.
Your last statement "you either need to have unique names or an
association value to correlate name with the intended email etc" could
you show me how I would fix this please. Could you possible show me
with some code? Thanks again for your help Jon.
Jon Paal wrote:
I can only cvomment based upon what you have provided. Your code indicates it is coming from a form ("request.form").
You can't allow multiple select of names and multiple select of emails and somehow hope they correspond to each other in the correct
order.
there is nothing unique here, there is a collection of values which are split.
FullName=Request.Form("Name")
FullNameDesc = Replace(FullName, "'", "''")
strFullName = Split(FullNameDesc,", ")
the resulting strFullName array is not likely to match with resulting array of emails in the correct order.
you either need to have unique names or an association value to correlate name with the intended email etc.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@i42g2000cwa.googlegr oups.com...
What is happening is the data is being returned from a select on an
LDAP server. Then I am looping thorugh the recordeset and returning the
objectrecordset of each field. What I am left with is for each field I
have a string of comma separated list that I would need to split so
that is why.
I Jon Paal wrote:
if it is unique then why are you splitting it ?
"MrHelpMe" <cl********@hotmail.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
That's exactly what I did as noted in the code shown.
Jon Paal wrote:
give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote:
when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order.
You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be
more
explicit in naming form fields to create the desired association.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems. -
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
-
response.write sSql & "<BR>"
-
Next
-
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info.
I believe the solution is to change your form and the processing page
--give each value in the form a unique name.
<INPUT
TYPE="text"
NAME="Name1">
--on the processing page retrieve that value by name.
FullName1 = request.form("name1")
--rinse.. repeat as needed for all fields
"MrHelpMe" <cl********@hotmail.comwrote in message news:11*********************@h48g2000cwc.googlegro ups.com...
Jon,
I do see what you mean but not understanding how to fix this with code.
Your last statement "you either need to have unique names or an
association value to correlate name with the intended email etc" could
you show me how I would fix this please. Could you possible show me
with some code? Thanks again for your help Jon.
Jon Paal wrote:
>I can only cvomment based upon what you have provided. Your code indicates it is coming from a form ("request.form").
You can't allow multiple select of names and multiple select of emails and somehow hope they correspond to each other in the correct order.
there is nothing unique here, there is a collection of values which are split.
> FullName=Request.Form("Name") FullNameDesc = Replace(FullName, "'", "''") strFullName = Split(FullNameDesc,", ")
the resulting strFullName array is not likely to match with resulting array of emails in the correct order.
you either need to have unique names or an association value to correlate name with the intended email etc.
"MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@i42g2000cwa.googlegr oups.com...
What is happening is the data is being returned from a select on an
LDAP server. Then I am looping thorugh the recordeset and returning the
objectrecordset of each field. What I am left with is for each field I
have a string of comma separated list that I would need to split so
that is why.
I Jon Paal wrote: if it is unique then why are you splitting it ?
"MrHelpMe" <cl********@hotmail.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
That's exactly what I did as noted in the code shown.
Jon Paal wrote: give each form field a specific unique name
FullName1=Request.Form("Name1")
"MrHelpMe" <cl********@hotmail.comwrote in message news:11********************@m73g2000cwd.googlegrou ps.com...
Jon,
Thanks for the reply. Is there any way you could show me this by
example? I'm still trying to learn asp and not sure what you mean by
"need to be more explicit in naming form fields". Does this require a
restructuring of my code? I was hoping to implement minimal changes to
my code. Could you possibly show me by using my exisiting code?
Thanks Jon.
Jon Paal wrote: when you do a request.form there's no assurance that all fields collection will arrive in a relatively correct order. You can verify this with a response.write stament follwing request.form for each field type. You will likely need to be more explicit in naming form fields to create the desired association. "MrHelpMe" <cl********@hotmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
Hello again experts,
I have successfully pulled data from an LDAP server and now what I want
to do is drop the data into a database table. The following is my code
that will insert the data but that has problems.
-
FullName=Request.Form("Name")
-
Email=Request.Form("Email")
-
GivenName=Request.Form("GivenName")
-
StreetAddress=Request.Form("StreetAddress")
-
FullNameDesc = Replace(FullName, "'", "''")
-
EmailDesc = Replace(Email, "'", "''")
-
GivenNameDesc = Replace(GivenName, "'", "''")
-
StreetAddressDesc = Replace(StreetAddress, "'", "''")
-
strFullName = Split(FullNameDesc,", ")
-
strEmailName = Split(EmailDesc,", ")
-
strGivenName = Split(GivenNameDesc,", ")
-
strStreetAddress = Split(StreetAddressDesc,", ")
-
Response.Buffer = True
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString = (ConnectionInfoHidden)
-
objConn.Open
-
For i = 0 to Ubound(strFullName)
-
sSQL = "INSERT into Users (FullName, Email, GivenName,Address)"
-
sSQL = sSQL & "VALUES ('" & strFullName(i) &"', '"& strEmailName(i)
-
&"', '" & strGivenName(i) &"', '" & strStreetAddress(i) &"')"
-
'objConn.Execute sSQL
-
response.write sSql & "<BR>"
-
Next
-
What is happening is for each user the fullname, email, given name and
address should get successfully entered into the database table however
some fullnames are getting the incorrect email address, given name etc.
while others are correct. Can anyone see a problem? I have checked the
data that is coming back from ldap and my code is definitely incorrect.
Why do some users get incorrect info...it's almost like they are
getting the prior users info. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Christopher Ambler |
last post by:
This is long, but it's driving me nuts. I need some adult supervision :-)
(and I'm not above bribing for help)
I have a stored procedure that I call that returns XML to me. The SP returns
3...
|
by: Shaggyh |
last post by:
hi im needing help with a program im writing to do subnetting
i was on before about it and i got some help.
the code below wont work for me and i cant think of why not.
i was wondering if anyone...
|
by: Cor |
last post by:
Hi Newsgroup,
I have given an answer in this newsgroup about a "Replace".
There came an answer on that I did not understand, so I have done some
tests.
I got the idea that someone said,...
|
by: moondaddy |
last post by:
I'm writing an app in vb.net 1.1 and I need to parse strings that look
similar to the one below. All 5 rows will make up one string. I have a
form where a use can copy/paste data like what you...
|
by: SLH |
last post by:
hi people. im trying to validate input received via a text area on an ASP
page before writing it to a database. i cant use client side javascript due
to policy, so it all has to happen on the...
|
by: rporter |
last post by:
I have a javascript utility and need so help with regular expressions..
Basically I have lines of data that consists of name=value pairs delimited with commas.
example
match=type...
|
by: thesinnerishere |
last post by:
i have created a program(link-generator) which is static in nature(it works correctly) meaning that this program must find the symbol { } first for it to operate properly.how can i make it dynamic so...
|
by: WP |
last post by:
Hello, below is my very first python program. I have some questions
regarding it and would like comments in general. I won't be able to get
my hands on a good python book until tomorrow at the...
|
by: jrod11 |
last post by:
hi,
I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| | |