From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Philippe Lang <philippe.lang@attiksystem.ch>
To: pgsql-odbc@postgresql.org
Subject: Re: Access, pass-through queries and isolation level
Date: Fri, 7 Nov 2003 06:27:40 -0800 (PST)
Message-ID: <20031107142740.46095.qmail@web20809.mail.yahoo.com> (raw)
In-Reply-To: <6C0CF58A187DA5479245E0830AF84F420AF737@poweredge.attiksystem.ch>
--- Philippe Lang <philippe.lang@attiksystem.ch>
wrote:
> I'm sending the two statements in one single
> pass-through query. Both statements are separated by
> a semicolon. I even tried to remove the carridge
> return at the end of the first statement, but of
> course, it has no effect.
>
> Postgres handles the sql commands fine. But I'm not
> able to get the return value from
> "func_test_insert", as soon as I add an sql command
> BEFORE the function call. BUT, if I add this SQL
> command AFTER the function call, it's OK.
> Apparently, the first statement is considered to be
> the one that returns data. All others are executed,
> but their return value is discarded. I guess this is
> an Access issue, more than an ODBC one, right?
By elimination, I would say sit has to be an ODBC
issue. In a pass through query, Access has no clue
about the meaning of what you are sending, and
PostgreSQL will certainly return the value you want.
If you haven't done so already, turn on ODBC logging,
and try posting the relevant sections to this list.
Someone knowledgable (that counts me out) might be
able to do something with that.
>
> -----Message d'origine-----
> De : Jeff Eckermann
> [mailto:jeff_eckermann@yahoo.com]
> Envoyé : jeudi, 6. novembre 2003 16:35
> À : Philippe Lang; pgsql-odbc@postgresql.org
> Objet : Re: [ODBC] Access, pass-through queries and
> isolation level
>
> > Now if I want to change the isolation level
> before:
> >
> > set transaction isolation level serializable;
> > select * from public."func_test_insert"();
> >
> > ... I cannot get the inserted id back in Access,
> > from the pass-through query. Apprently, since the
> > first query does not return any row, Access
> > considers the whole query does not return
> anything.
>
> Are you sending the two statements as separate
> queries
> in your code? If so, try sending both as a single
> query, i.e. one string, with a semicolon separating
> the two. Access doesn't know you are sending two
> statements in one, and Postgres will handle them
> just fine.
>
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: jeff_eckermann@yahoo.com, philippe.lang@attiksystem.ch
Subject: Re: Access, pass-through queries and isolation level
In-Reply-To: <20031107142740.46095.qmail@web20809.mail.yahoo.com>
References: <6C0CF58A187DA5479245E0830AF84F420AF737@poweredge.attiksystem.ch> <20031107142740.46095.qmail@web20809.mail.yahoo.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