Problem with the empty space into Session variables

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Problem with the empty space into Session variables

    Hi,

    I have a web page that displays records from tables in a database. It
    is designed to store field's value into Session variables before it
    displays into a text box. This record can be edited and/or deleted.
    The problem arises when one of the fields contains spaces between the
    letters. When it stores into the database, after editing, the space
    stores as a some unrecognizable format. These characters can only be
    seen
    using web interface on my main computer as question marks. The only
    way to see them from any other computer would be to use non-web
    application. Why do I get
    those question marks?

    Any suggestions would be greatly appreciated.

    Thanks in advance
    Yury.

    Yury Guest

  2. Similar Questions and Discussions

    1. #25574 [Bgs]: empty session.save_path = problem (session.use_only_cookies = 1)
      ID: 25574 User updated by: markus.welsch@suk.de Reported By: markus dot welsch at suk dot de Status: Bogus Bug...
    2. #25574 [Opn->Bgs]: empty session.save_path = problem (session.use_only_cookies = 1)
      ID: 25574 Updated by: iliaa@php.net Reported By: markus dot welsch at suk dot de -Status: Open +Status: ...
    3. #25574 [Opn]: empty session.save_path = problem (session.use_only_cookies = 1)
      ID: 25574 User updated by: markus.welsch@suk.de Reported By: markus dot welsch at suk dot de Status: Open Bug Type:...
    4. #25574 [NEW]: empty session.save_path = problem (session.use_only_cookies = 1)
      From: markus dot welsch at suk dot de Operating system: Linux 2.4.22 (Debian 3.0r1) PHP version: 4.3.3 PHP Bug Type: Session...
    5. Session problem when setting session variables in files that are in different directories
      I am running PHP 4.3.0 on a WinXPpro machine and I recently got problem with sessions. What I am building is a loginsystem and I need to save...
  3. #2

    Default Re: Problem with the empty space into Session variables

    not quite seeing what you mean here - got any more info?






    ________________________________________
    Atrax. MVP, IIS
    [url]http://rtfm.atrax.co.uk/[/url]

    newsflash : Atrax.Richedit 1.0 now released.
    [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Atrax Guest

  4. #3

    Default Re: Problem with the empty space into Session variables

    The problem is that during passing a value that contain an empty space
    from the database through session variable to text box and then
    execute update record command; there is no empty space anymore.

    On Fri, 18 Jul 2003 01:07:41 -0700, Atrax <atrax@dontspamatrax.co.uk>
    wrote:
    >not quite seeing what you mean here - got any more info?
    >
    >
    >
    >
    >
    >
    >________________________________________
    >Atrax. MVP, IIS
    >[url]http://rtfm.atrax.co.uk/[/url]
    >
    >newsflash : Atrax.Richedit 1.0 now released.
    >[url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
    >
    >*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    >Don't just participate in USENET...get rewarded for it!
    Yury Guest

  5. #4

    Default Re: Problem with the empty space into Session variables

    Instead of explaining, SHOW us what happens.

    Bob
    Yury wrote:
    > The problem is that during passing a value that contain an empty space
    > from the database through session variable to text box and then
    > execute update record command; there is no empty space anymore.
    >
    > On Fri, 18 Jul 2003 01:07:41 -0700, Atrax <atrax@dontspamatrax.co.uk>
    > wrote:
    >
    >> not quite seeing what you mean here - got any more info?
    >>
    >>
    >>
    >>
    >>
    >>
    >> ________________________________________
    >> Atrax. MVP, IIS
    >> [url]http://rtfm.atrax.co.uk/[/url]
    >>
    >> newsflash : Atrax.Richedit 1.0 now released.
    >> [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
    >>
    >> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    >> Don't just participate in USENET...get rewarded for it!

    Bob Barrows Guest

  6. #5

    Default Re: Problem with the empty space into Session variables

    To run this app I use .ASP page and .INC
    Here is a shortened version of the call flow

    rsMY.Open stSQL,Connect, adOpenDynamic, adLockOptimistic

    Session("TANKNBR") =rsMY("SOMENBR")
    Session("TANKDESC")=rsMY("SOMEDESC")

    <table>
    <tr><th align=left><INPUT name=SOMENBR
    value=<%=Session("SOMENBR")%>></th>
    <th align=left><INPUT name=SOMEDESC
    value=<%=Session("SOMEDESC")%>></th>
    </tr>
    </table>

    FOR UPDATES I use
    qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    trim(Request.Form("SOMEDESC")) & "')"
    TO ADD I use
    qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    trim(Request.Form("SOMEDESC")) & "')"

    Connect.Execute stSQL

    If I use ADD statement it can place empty space, but if I use
    Update statement the problem happened.
    It does not matter which field I modified. If there were empty space
    into SOMEDESC field there will be no empty space anymore. Besides
    if I modify SOMEDESC so I add another empty space new empty space will
    store but old one will not.

    I hope it will help you to understand the problem and help me with
    this.
    Thank you for your respond.
    Yury.



    On Fri, 18 Jul 2003 08:34:00 -0400, "Bob Barrows"
    <reb_01501@yahoo.com> wrote:
    >Instead of explaining, SHOW us what happens.
    >
    >Bob
    >Yury wrote:
    >> The problem is that during passing a value that contain an empty space
    >> from the database through session variable to text box and then
    >> execute update record command; there is no empty space anymore.
    >>
    >> On Fri, 18 Jul 2003 01:07:41 -0700, Atrax <atrax@dontspamatrax.co.uk>
    >> wrote:
    >>
    >>> not quite seeing what you mean here - got any more info?
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> ________________________________________
    >>> Atrax. MVP, IIS
    >>> [url]http://rtfm.atrax.co.uk/[/url]
    >>>
    >>> newsflash : Atrax.Richedit 1.0 now released.
    >>> [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
    >>>
    >>> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    >>> Don't just participate in USENET...get rewarded for it!
    >
    >
    Yury Guest

  7. #6

    Default Re: Problem with the empty space into Session variables

    You misunderstood. It's good that you show us the code. However, you still
    haven't shown us what happens that's not supposed to happen! You're
    explanation about "empty space" may be perfectly clear to you, but it's
    going right over my head. Show us what you are talking about instead of
    trying to describe it. In other words, show us what you mean by "empty
    space". It sounds as if there is some text involved. Show us an example of
    the text, and then show us what happens to the text.

    Bob Barrows
    PS. As I look briefly at your code, I have to wonder why you are using
    session variables. They certainly do not seem to be needed for the tasks you
    have shown us.

    Yury wrote:
    > To run this app I use .ASP page and .INC
    > Here is a shortened version of the call flow
    >
    > rsMY.Open stSQL,Connect, adOpenDynamic, adLockOptimistic
    >
    > Session("TANKNBR") =rsMY("SOMENBR")
    > Session("TANKDESC")=rsMY("SOMEDESC")
    >
    > <table>
    > <tr><th align=left><INPUT name=SOMENBR
    > value=<%=Session("SOMENBR")%>></th>
    > <th align=left><INPUT name=SOMEDESC
    > value=<%=Session("SOMEDESC")%>></th>
    > </tr>
    > </table>
    >
    > FOR UPDATES I use
    > qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    > "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    > trim(Request.Form("SOMEDESC")) & "')"
    > TO ADD I use
    > qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    > "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    > trim(Request.Form("SOMEDESC")) & "')"
    >
    > Connect.Execute stSQL
    >
    > If I use ADD statement it can place empty space, but if I use
    > Update statement the problem happened.
    > It does not matter which field I modified. If there were empty space
    > into SOMEDESC field there will be no empty space anymore. Besides
    > if I modify SOMEDESC so I add another empty space new empty space will
    > store but old one will not.
    >
    > I hope it will help you to understand the problem and help me with
    > this.
    > Thank you for your respond.
    > Yury.
    >
    >
    >
    > On Fri, 18 Jul 2003 08:34:00 -0400, "Bob Barrows"
    > <reb_01501@yahoo.com> wrote:
    >
    >> Instead of explaining, SHOW us what happens.
    >>
    >> Bob
    >> Yury wrote:
    >>> The problem is that during passing a value that contain an empty
    >>> space from the database through session variable to text box and
    >>> then execute update record command; there is no empty space anymore.
    >>>
    >>> On Fri, 18 Jul 2003 01:07:41 -0700, Atrax
    >>> <atrax@dontspamatrax.co.uk> wrote:
    >>>
    >>>> not quite seeing what you mean here - got any more info?
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> ________________________________________
    >>>> Atrax. MVP, IIS
    >>>> [url]http://rtfm.atrax.co.uk/[/url]
    >>>>
    >>>> newsflash : Atrax.Richedit 1.0 now released.
    >>>> [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
    >>>>
    >>>> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    >>>> Don't just participate in USENET...get rewarded for it!

    Bob Barrows Guest

  8. #7

    Default Re: Problem with the empty space into Session variables

    the input tab value attribute will truncate the data at the first blank if
    you do not enclose the data in quotes.

    value=<%=Session("SOMEDESC")%>

    s/b

    value="<%=Server.HTMLEncode(Session("SOMEDESC"))%> ">

    --
    Mark Schupp
    --
    Head of Development
    Integrity eLearning
    Online Learning Solutions Provider
    [email]mschupp@ielearning.com[/email]
    [url]http://www.ielearning.com[/url]
    714.637.9480 x17


    "Yury" <y_luchko@hotmail.com> wrote in message
    news:3f18264a.22690367@nntp...
    > To run this app I use .ASP page and .INC
    > Here is a shortened version of the call flow
    >
    > rsMY.Open stSQL,Connect, adOpenDynamic, adLockOptimistic
    >
    > Session("TANKNBR") =rsMY("SOMENBR")
    > Session("TANKDESC")=rsMY("SOMEDESC")
    >
    > <table>
    > <tr><th align=left><INPUT name=SOMENBR
    > value=<%=Session("SOMENBR")%>></th>
    > <th align=left><INPUT name=SOMEDESC
    > value=<%=Session("SOMEDESC")%>></th>
    > </tr>
    > </table>
    >
    > FOR UPDATES I use
    > qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    > "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    > trim(Request.Form("SOMEDESC")) & "')"
    > TO ADD I use
    > qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    > "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    > trim(Request.Form("SOMEDESC")) & "')"
    >
    > Connect.Execute stSQL
    >
    > If I use ADD statement it can place empty space, but if I use
    > Update statement the problem happened.
    > It does not matter which field I modified. If there were empty space
    > into SOMEDESC field there will be no empty space anymore. Besides
    > if I modify SOMEDESC so I add another empty space new empty space will
    > store but old one will not.
    >
    > I hope it will help you to understand the problem and help me with
    > this.
    > Thank you for your respond.
    > Yury.
    >
    >
    >
    > On Fri, 18 Jul 2003 08:34:00 -0400, "Bob Barrows"
    > <reb_01501@yahoo.com> wrote:
    >
    > >Instead of explaining, SHOW us what happens.
    > >
    > >Bob
    > >Yury wrote:
    > >> The problem is that during passing a value that contain an empty space
    > >> from the database through session variable to text box and then
    > >> execute update record command; there is no empty space anymore.
    > >>
    > >> On Fri, 18 Jul 2003 01:07:41 -0700, Atrax <atrax@dontspamatrax.co.uk>
    > >> wrote:
    > >>
    > >>> not quite seeing what you mean here - got any more info?
    > >>>
    > >>>
    > >>>
    > >>>
    > >>>
    > >>>
    > >>> ________________________________________
    > >>> Atrax. MVP, IIS
    > >>> [url]http://rtfm.atrax.co.uk/[/url]
    > >>>
    > >>> newsflash : Atrax.Richedit 1.0 now released.
    > >>> [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
    > >>>
    > >>> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > >>> Don't just participate in USENET...get rewarded for it!
    > >
    > >
    >

    Mark Schupp Guest

  9. #8

    Default Re: Problem with the empty space into Session variables

    Thank you for your help. The problem was solved by placing
    Session variables in quotes.

    Yury.

    On Fri, 18 Jul 2003 11:16:19 -0700, "Mark Schupp"
    <mschupp@ielearning.com> wrote:
    >the input tab value attribute will truncate the data at the first blank if
    >you do not enclose the data in quotes.
    >
    >value=<%=Session("SOMEDESC")%>
    >
    >s/b
    >
    >value="<%=Server.HTMLEncode(Session("SOMEDESC"))% >">
    >
    >--
    >Mark Schupp
    >--
    >Head of Development
    >Integrity eLearning
    >Online Learning Solutions Provider
    >mschupp@ielearning.com
    >[url]http://www.ielearning.com[/url]
    >714.637.9480 x17
    >
    >
    >"Yury" <y_luchko@hotmail.com> wrote in message
    >news:3f18264a.22690367@nntp...
    >> To run this app I use .ASP page and .INC
    >> Here is a shortened version of the call flow
    >>
    >> rsMY.Open stSQL,Connect, adOpenDynamic, adLockOptimistic
    >>
    >> Session("TANKNBR") =rsMY("SOMENBR")
    >> Session("TANKDESC")=rsMY("SOMEDESC")
    >>
    >> <table>
    >> <tr><th align=left><INPUT name=SOMENBR
    >> value=<%=Session("SOMENBR")%>></th>
    >> <th align=left><INPUT name=SOMEDESC
    >> value=<%=Session("SOMEDESC")%>></th>
    >> </tr>
    >> </table>
    >>
    >> FOR UPDATES I use
    >> qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    >> "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    >> trim(Request.Form("SOMEDESC")) & "')"
    >> TO ADD I use
    >> qSQL = "INSERT INTO Inventory (SOMENBR,SOMEDESC) " & _
    >> "VALUES('" & trim(Request.Form("SOMENBR")) & "','" & _
    >> trim(Request.Form("SOMEDESC")) & "')"
    >>
    >> Connect.Execute stSQL
    >>
    >> If I use ADD statement it can place empty space, but if I use
    >> Update statement the problem happened.
    >> It does not matter which field I modified. If there were empty space
    >> into SOMEDESC field there will be no empty space anymore. Besides
    >> if I modify SOMEDESC so I add another empty space new empty space will
    >> store but old one will not.
    >>
    >> I hope it will help you to understand the problem and help me with
    >> this.
    >> Thank you for your respond.
    >> Yury.
    >>
    >>
    >>
    >> On Fri, 18 Jul 2003 08:34:00 -0400, "Bob Barrows"
    >> <reb_01501@yahoo.com> wrote:
    >>
    >> >Instead of explaining, SHOW us what happens.
    >> >
    >> >Bob
    >> >Yury wrote:
    >> >> The problem is that during passing a value that contain an empty space
    >> >> from the database through session variable to text box and then
    >> >> execute update record command; there is no empty space anymore.
    >> >>
    >> >> On Fri, 18 Jul 2003 01:07:41 -0700, Atrax <atrax@dontspamatrax.co.uk>
    >> >> wrote:
    >> >>
    >> >>> not quite seeing what you mean here - got any more info?
    >> >>>
    >> >>>
    >> >>>
    >> >>>
    >> >>>
    >> >>>
    >> >>> ________________________________________
    >> >>> Atrax. MVP, IIS
    >> >>> [url]http://rtfm.atrax.co.uk/[/url]
    >> >>>
    >> >>> newsflash : Atrax.Richedit 1.0 now released.
    >> >>> [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
    >> >>>
    >> >>> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    >> >>> Don't just participate in USENET...get rewarded for it!
    >> >
    >> >
    >>
    >
    >
    Yury Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139