From: D Johnson <dspectra@home.com>
To: mdavis@sevainc.com <mdavis@sevainc.com>
Cc: pgsql-interfaces@postgresql.org <pgsql-interfaces@postgresql.org>
Subject: Re: MS Access memo datatypes
Date: Fri, 12 Jan 2001 05:40:39 -0600
Message-ID: <3A5EED37.B6049206@home.com> (raw)
References: <01C07C16.CC8B9B80.mdavis@sevainc.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: dspectra@home.com, mdavis@sevainc.com
Subject: Re: MS Access memo datatypes
In-Reply-To: <3A5EED37.B6049206@home.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox