Re: MS Access memo datatypes

Поиск
Список
Период
Сортировка
От D Johnson
Тема Re: MS Access memo datatypes
Дата
Msg-id 3A5EED37.B6049206@home.com
обсуждение исходный текст
Ответ на RE: MS Access memo datatypes  (Michael Davis <mdavis@sevainc.com>)
Список pgsql-interfaces
Yes,  Postgres ODBC creates text field data types when I export the MS
Access tables. But, the Postgres data types map back to var chars with a
limit of 255 chars.

I just figured out a way to support memo types and have MSAccess
recognize the type when I link tables from Postgres to Access. It won't
support the full 32K memo field of Access but it does create 8K memo
fields similar to Postgres text data type. Sure is better than 255
characters, and it's simple to set up.

Try this:

CREATE FUNCTION textfunc (text) RETURNS text as  'SELECT $1;' LANGUAGE
'SQL';

CREATE TYPE memo ( internallength = 8000, externallength=8000, input =
textfunc, output= textfunc, send = textfunc, receive = textfunc,
default= '-');

ex.
CREATE TABLE memotest (  memo id int4, memfld memo );


After you create the function,data type and a table def. then in Access
relink your table to the Postgres table definition. In the Access table
design tool you can open the table and should see the memo definition
with a size of 8K.


Dave Johnson


Michael Davis wrote:

> I used the text datatype.
>
> -----Original Message-----
> From:   D Johnson [SMTP:dspectra@home.com]
> Sent:   Wednesday, January 10, 2001 5:12 AM
> To:     pgsql-interfaces@postgresql.org
> Subject:        MS Access memo datatypes
>
> Does anyone have a work around from MS Access memo data type in
> Postgres. I don't want to use LOB's either.
>
> D. Johnson



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Alfredo Haeussler"
Дата:
Сообщение: ODBC with VISUAL BASIC applications to access POSTGRESQL db on LINUX??
Следующее
От: "Steve Howe"
Дата:
Сообщение: Must implement PQnotifyFree()