Hi,
I'm using Access Database with ASP. There is one particular thing that I
have issue with.
My purpose is for user to update their own profile. Their existing profile
information will be display in Edit Form format. The problem is if the field
has space, the second word will not display, when I display in input text
format.
E.g if My first name "User_FirstName " in my table has entry, let say "David
Johnson" as FirstName, when I execute following code and do a input text, it
will display "David" only.
I have following code.
<% Dim MyProfile
Set MyProfile= Server.CreateOb ject("ADODB.Con nection")
ConnStr = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & Server.MapPath
("database/users.mdb") & ";Jet OLEDB:Database Password=passwo rd"
MyProfile.Open( ConnStr)
SQLtemp = "SELECT * FROM UserAccount WHERE User_UserName = '" &
Request.Cookies ("UserName") & "' "
Set rs = MyProfile.Execu te(SQLtemp)
while not rs.eof
If Request.Cookies ("UserName") = rs("User_UserNa me") Then
dim Your_FirstName
Your_FirstName = rs("User_FirstN ame")
dim Your_LastName
Your_LastName = rs("User_LastNa me")
dim Your_UserName
Your_UserName = rs("User_UserNa me")
dim Your_Password
Your_Password = rs("User_Passwo rd")
dim Your_Email
Your_Email = rs("User_Email" )
dim Your_Address
Your_Address = rs("User_Addres s")
dim Your_City
Your_City = rs("User_City" )
dim Your_Country
Your_Country = rs("User_Countr y")
dim Your_Date_In
Your_Date_In = rs("User_EntryD ate")
dim Your_Company
Your_Company = rs("User_Compan y")
dim Your_Designatio n
Your_Designatio n = rs("User_Design ation")
dim Your_Phone
Your_Phone = rs("User_Phone" )
End If
rs.MoveNext
Wend
rs.Close
MyProfile.Close
set MyProfile = Nothing
%>
....
<td width="118" valign="top"><s pan class="bold">Fi rst
Name:</span></td>
<td width="624" valign="top"><i nput type="text" name="xFirstNam e"
size="20" value=<%respons e.write Your_FirstName %> maxlength="15"> </td>
.... This will display "David"
So, if I'm not using input type text to display is, for example,
<td width="118" valign="top"><s pan class="bold">Fi rst
Name:</span></td>
<td width="624" valign="top"><% response.write Your_FirstName %></td>
... This will display "David Johnson"
May I know why ? and how to fix it to display "David Johnson" in input text
format.
Thank you,
Regards,
Magix