The Answer: (Was: TextBox Character Limit? (MS Access 2002 .adp connected to SQL))



"HumanJHawkins" <HumanJHawkins.1mujgm@xxxxxxxxxxxxxxxxxx> wrote in message
news:HumanJHawkins.1mujgm@xxxxxxxxxxxxxxxxxxxxx
>
> I have an SQL DB (MS SQL Server 2000 SP 3) with a varchar(1024) field in
> it.
>
> I have made an .adp interface for this data. I am trying to allow users
> to enter data in _other_ fields and use VB to concatenate other fields
> into this 1024 char long field. However, whenever the concatenation
> exceeds 255 characters it fails. Oddly, instead of truncating it at
> 255, it only shows the remaining text after the first 255 characters.
>
> So, if the text is under 255, it works perfectly. But if I go one word
> over, the only thing in the text box is that one word that went over.
<CUT>

The answer is that Access will not send more than 255 chars to a varchar,
even if it can hold more. However, changing the varchar to a "Text" data
type works around this bug in Access.

Cheers!


.



Relevant Pages

  • Re: Char and Varchar
    ... If the maximum length is short (<= 10 characters), ... maximum length, I also use CHAR. ... I use VARCHAR if long and short ...
    (microsoft.public.sqlserver.server)
  • Re: Char and Varchar
    ... If the maximum length is short (<= 10 characters), ... maximum length, I also use CHAR. ... I use VARCHAR if long and short ...
    (microsoft.public.sqlserver.programming)
  • Re: char or varchar?
    ... Actually, when it comes to database operations, char fields are more ... memory due to the changing size of the data. ... varchar is better, as it return the data trimmed appropriately. ... the string with the number of characters that the string contains. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: text vs varchar vs image vs ?
    ... it is set to varchar. ... declare local variables of these types". ... I was sure 8000 characters would ...
    (microsoft.public.sqlserver.fulltext)
  • TextBox Character Limit? (MS Access 2002 .adp connected to SQL)
    ... I have made an .adp interface for this data. ... to enter data in _other_ fields and use VB to concatenate other fields ... into this 1024 char long field. ... it only shows the remaining text after the first 255 characters. ...
    (microsoft.public.access.externaldata)