Hello,
Couldn't you just do select 't' as t ? This seems to work on MS
Access2K. If you are (for whatever reason) actually wanting to execute the
query on the server instead then try a pass-through query (note:
pass-through queries only return snapshot recordsets).
- Stuart
> -----Original Message-----
> From: Joseph [SMTP:lters@mrtc.com]
> Sent: Saturday, July 21, 2001 12:44 PM
> To: Pgsql-Odbc@Postgresql.Org
> Subject: RE: Access 97 - problems with the result set
>
> Answering my own question, partly...
>
> Turns out access seems upset at least some of the time if
> there are no REAL fields returned from the database.
>
> So if we have a table foo with a field f1
> and
> we query it this way - SELECT 't' as t from foo
> there is no error on postgresql but access first runs the query as is then
> tries 'SELECT * FROM SELECT 't' as t from foo' which causes an error on
> server, and therefore the error on access.
>
> Any thoughts about how to fix this other that doing adding a REAL field so
> it dosen't fail
> as - 'SELECT 't' as t,OID from foo' (which works fine).
>
>
> > -----Original Message-----
> > From: pgsql-odbc-owner@postgresql.org
> > [mailto:pgsql-odbc-owner@postgresql.org]On Behalf Of Joseph
> > Sent: Saturday, July 21, 2001 7:19 AM
> > To: Pgsql-Odbc@Postgresql.Org
> > Subject: [ODBC] Access 97 - problems with the result set
> >
> >
> > I am running access queries and it seems that it thinks certain
> > queries were
> > unsuccessful when in fact they were successful...!
> >
> > Is there something special that access expects to get back which
> > indicates a
> > successful query?
> >
> > Of course access appends the horrid select * from to the front of
> > the query
> > and then postgres promptly gives and error.
> >
> > Access then reports an error. Even though the original query executed
> fine
> > on the server.
> >
> > Postgres 7.1.2
> > odbc 7.01.0006
> > win2k is the client
> >
> >
> > respectfully,
> > Joseph
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
>