Re: MS Access memo datatypes - Mailing list pgsql-interfaces

From D Johnson
Subject Re: MS Access memo datatypes
Date
Msg-id 3A5EED37.B6049206@home.com
Whole thread Raw
In response to RE: MS Access memo datatypes  (Michael Davis <mdavis@sevainc.com>)
List 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 by date:

Previous
From: "Alfredo Haeussler"
Date:
Subject: ODBC with VISUAL BASIC applications to access POSTGRESQL db on LINUX??
Next
From: "Steve Howe"
Date:
Subject: Must implement PQnotifyFree()