From: | Chris Andrews <chris(at)netsw(dot)co(dot)uk> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: Cannot access views |
Date: | 2001-06-20 21:43:39 |
Message-ID: | Pine.LNX.4.21.0106202231450.12451-100000@rhododendron.symes.netsw.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
On Wed, 20 Jun 2001, Joern Muehlencord wrote:
> Hello Cedar,
>
> > hmm.. I still don't completely understand. Let's say, for example, you
> > have a test table "testtable" and view "testview". If I understand, from
> > psql you can select * from both and it works, but going into Word
> > testtable works but testview does not. Correct?
> Yes - that is the problem. Using psql I can do everything I want to - what
> ever I use (view or table). Using Word I can only access the table.
> testview was createte by something like that:
> create view testview as select * from testtable where id in (select adressid
> from lists where listid = '1')
> lists is a "n:m-resolve-Table" (creating n lists with m datasets from
> testtable)
I found a problem using Word 97 (and MSQuery) and Postgres: if the query
string put together by MSQuery is longer than 255 characters, it will add
a carriage return every 256 characters... this appears to be a generic
Word problem - I found vague references to it in the MS tech web site, and
a potential fix in Office 2000 SP1.
The symptoms were that MSQuery would complain "can't open the datasource"
- or some similar useless error. The errors from postgres were of the form
'error in SQL syntax' followed by some truncated-looking SQL. Typically
the error would be mismatched quotes. I watched the network during queries
and noted the extra line breaks.
Ironically, my workaround is to define a view which only returns the
fields I want so I can say 'SELECT * FROM my_view;', which is shorter than
255 chars, and seems to work ok.
I'd be surprised if this is what you're seeing, but it's worth a mention.
Chris.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-06-21 01:02:21 | Re: slow performance postgres 7.0.3 and odbc |
Previous Message | Vince Vielhaber | 2001-06-20 20:01:27 | Re: Download of ODBC driver |