Re: Can't get more than 255 chars out of memo field in Acc - Mailing list pgsql-odbc

From Jeff Eckermann
Subject Re: Can't get more than 255 chars out of memo field in Acc
Date
Msg-id 20021127154651.47052.qmail@web20803.mail.yahoo.com
Whole thread Raw
In response to Re: Can't get more than 255 chars out of memo field in Acc  ("Henshall, Stuart - Design & Print" <SHenshall@westcountry-design-print.co.uk>)
Responses Re: Can't get more than 255 chars out of memo field in Acc
List pgsql-odbc
This raises an issue for Access developers which, in
spite of searching archives, FAQs etc. I have not seen
explicitly stated anywhere.

I have found that, to be able to use both "text" and
"memo" types within Access, linking to tables in a
PostgreSQL database, the following must be done:
* table definitions in PostgreSQL must use "varchar"
for fields desired to be "text" in Access, and "text"
for fields desired to be "memo" in Access, and:
* "Text As LongVarChar" must be checked in the DSN.

This conflicts somewhat with the usual advice given on
the use of PostgreSQL data types, which summarizes as:
"varchar has no advantage over text, unless you have a
reason to limit the size of the field".  Since "text"
is so easy to use (one size fits all), that can lead
to a blithe use of "text" fields, which for Access
developers can be a trap waiting to happen.

I can see at least one major dump-and-edit session in
my future.

Since I am discussing Access development issues, I
would be interested in comments on the boolean issue,
which I see has caused much discussion in the past.

I have found that with the "Bools As Char" option
checked, all of my check boxes failed to work.  They
could be unchecked successfully, but when attempting
to check an unchecked box, Access would raise an error
like: "The data that you attempted to insert is too
large for the field".  Looking at the table design
window in Access, I saw that all of the boolean fields
were rendered as "text".

After unchecking the "Bools As Char" option, and
running the "booleqint4" operator creation code that
has been posted to this list in the past, my problem
went away.  After relinking the tables, they now all
show "Yes/No" for all of the boolean fields, and check
boxes work as expected.

I know that others like different solutions (using
int2 has been mentioned), but I like the "fix once and
forget" nature of my solution.  Is there some pitfall
that I am missing here?

--- "Henshall, Stuart - Design & Print"
<SHenshall@westcountry-design-print.co.uk> wrote:
> Benjamin Scherrey wrote:
> > I am unable to
> > get a text field (which was formerlly a memo field
> when it
> > was local to Access) to allow me to enter
> > more than 255 characters into the database.
> >
> Ensure that text as long varchar is checked
> hth,
> - Stuart
>


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: Re: ODBC changes
Next
From: Benjamin Scherrey
Date:
Subject: Re: Can't get more than 255 chars out of memo field in Acc