String truncated

Discussion in 'ASP General' started by jm, Jan 18, 2008.

  1. jm

    jm Guest

    Hello,

    When i try to add a string to an Access db field it is truncated ?

    here is the code :

    If Err.Number <> 0 Then ErreurDescription = Err.Description Else
    response.redirect("main.asp")End If
    RS("Description") = ErreurDescription
    RS.update

    Err.Description is "'Socket Error # 10061 Connection refused." but in the DB
    i can only see "'Socket Error # 10061"

    if i change as that :
    If Err.Number <> 0 Then ErreurDescription = Err.Description Else
    response.redirect("main.asp")End If
    ErreurDescription = "Socket Error # 10061 Connection refused."
    RS("Description") = ErreurDescription
    RS.update

    The result in the dB is correct ????

    I've checked the value of ErreurDescription,it is still the good one after
    RS("Description") = ErreurDescription in both case

    Thanks for your help
    Jean-Michel
    jm, Jan 18, 2008
    #1
    1. Advertising

  2. jm

    jm Guest

    The original lines were formated like yours.

    Thanks for your help


    "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> a écrit dans le
    message de news: ...
    > try adding some line breaks as :
    >
    > If Err.Number <> 0 Then
    > ErreurDescription = Err.Description
    > Else
    > response.redirect("main.asp")
    > End If
    >
    > RS("Description") = ErreurDescription
    > RS.update
    >
    >
    > "jm" <> wrote in message
    > news:4790e33a$0$22211$...
    >> Hello,
    >>
    >> When i try to add a string to an Access db field it is truncated ?
    >>
    >> here is the code :
    >>
    >> If Err.Number <> 0 Then ErreurDescription = Err.Description Else
    >> response.redirect("main.asp")End If
    >> RS("Description") = ErreurDescription
    >> RS.update
    >>
    >> Err.Description is "'Socket Error # 10061 Connection refused." but in the
    >> DB i can only see "'Socket Error # 10061"
    >>
    >> if i change as that :
    >> If Err.Number <> 0 Then ErreurDescription = Err.Description Else
    >> response.redirect("main.asp")End If
    >> ErreurDescription = "Socket Error # 10061 Connection refused."
    >> RS("Description") = ErreurDescription
    >> RS.update
    >>
    >> The result in the dB is correct ????
    >>
    >> I've checked the value of ErreurDescription,it is still the good one
    >> after RS("Description") = ErreurDescription in both case
    >>
    >> Thanks for your help
    >> Jean-Michel
    >>
    >>
    >>
    >>
    >>

    >
    >
    jm, Jan 18, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    27,151
  2. goldtech
    Replies:
    5
    Views:
    387
    goldtech
    Sep 1, 2007
  3. George Jackson
    Replies:
    1
    Views:
    209
    George Jackson
    Jan 11, 2006
  4. J. Muenchbourg

    String or binary data would be truncated error

    J. Muenchbourg, Sep 18, 2003, in forum: ASP General
    Replies:
    1
    Views:
    173
    Ray at
    Sep 18, 2003
  5. Mike
    Replies:
    1
    Views:
    258
    Bob Barrows [MVP]
    Aug 25, 2005
Loading...

Share This Page