469,647 Members | 1,800 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

String truncated

jm
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

Jan 18 '08 #1
3 2521
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" <no******************@free.frwrote in message news:47***********************@news.free.fr...
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



Jan 18 '08 #2
jm
The original lines were formated like yours.

Thanks for your help
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot coma écrit dans le
message de news: 13*************@corp.supernews.com...
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" <no******************@free.frwrote in message
news:47***********************@news.free.fr...
>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




Jan 18 '08 #3
do a response.write on the web page to see what is produced before the database is updated.

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

Jan 19 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Gaurav | last post: by
3 posts views Thread by Chumley Walrus | last post: by
4 posts views Thread by R.Manikandan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.