String truncated
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
Re: String truncated
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_spam_123456_prout [at] free.fr> wrote in message news:4790e33a$0$22211$426a74cc [at] 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
>
>
>
>
>
Re: String truncated
The original lines were formated like yours.
Thanks for your help
"Jon Paal [MSMD]" <Jon nospam Paal [at] everywhere dot com> a écrit dans le
message de news: 13p265j9u19mf48 [at] 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_spam_123456_prout [at] free.fr> wrote in message
> news:4790e33a$0$22211$426a74cc [at] 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
>>
>>
>>
>>
>>
>
>
Re: String truncated
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