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
JM [ Fr, 18 Januar 2008 18:34 ] [ ID #1911442 ]

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
>
>
>
>
>
Jon Paal [ Fr, 18 Januar 2008 22:22 ] [ ID #1911446 ]

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
>>
>>
>>
>>
>>
>
>
JM [ Sa, 19 Januar 2008 00:04 ] [ ID #1911448 ]

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
Jon Paal [ Sa, 19 Januar 2008 01:07 ] [ ID #1912035 ]
Webserver » microsoft.public.inetserver.asp.general » String truncated

Vorheriges Thema: open popup window when website opens
Nächstes Thema: SQL Query trouble