String truncated

String truncated

am 18.01.2008 18:34:58 von 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

Re: String truncated

am 18.01.2008 22:22:58 von Jon Paal

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$426a74cc@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

am 19.01.2008 00:04:16 von JM

The original lines were formated like yours.

Thanks for your help


"Jon Paal [MSMD]" a écrit dans le
message de news: 13p265j9u19mf48@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" wrote in message
> news:4790e33a$0$22211$426a74cc@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

am 19.01.2008 01:07:00 von Jon Paal

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