From: | D Johnson <dspectra(at)home(dot)com> |
---|---|
To: | "mdavis(at)sevainc(dot)com" <mdavis(at)sevainc(dot)com> |
Cc: | "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: MS Access memo datatypes |
Date: | 2001-01-12 11:40:39 |
Message-ID: | 3A5EED37.B6049206@home.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)home(dot)com]
> Sent: Wednesday, January 10, 2001 5:12 AM
> To: pgsql-interfaces(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Miguel Gonzalez | 2001-01-12 17:22:20 | BDE Configuration |
Previous Message | Markus Wagner | 2001-01-12 09:22:16 | Re: [SQL] connecting to postgres server from Access |