pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: 'Albert Graef' <Dr.Graef@t-online.de>
Cc: pgsql-odbc@postgresql.org
Subject: Re: problem with multiple result sets
Date: Sun, 21 Sep 2003 20:49:19 +0900
Message-ID: <001901c38036$649c4ca0$3d283ddb@PbgX> (raw)
In-Reply-To: <3F6D8812.2030404@t-online.de>

> -----Original Message-----
> From: Albert Graef [mailto:Dr.Graef@t-online.de] 
> Sent: Sunday, September 21, 2003 8:14 PM
> To: Hiroshi Inoue
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] problem with multiple result sets
> 
> 
> Hiroshi Inoue wrote:
> > Oh I see. I would try to fix it. However, I'm not sure how to
> > fix it in your *nix environment.
> 
> Hi, thanks a lot for your reply. If the fix is in the driver, 
> I'll just 
> take the diffs and apply them to the driver sources (or download the 
> updated driver sources) and recompile, that shouldn't be a 
> problem. Or 
> would I have to change the code of the application?

I can't make diff now, sorry.
In PGAPI_MoreResults() in results.c, please try to insert
the 2 lines between /* insert the following ... */ and /* insert end */.

RETCODE		SQL_API
PGAPI_MoreResults(
				  HSTMT hstmt)
{
	const char *func = "PGAPI_MoreResults";
	StatementClass	*stmt = (StatementClass *) hstmt;
	QResultClass	*res;

	mylog("%s: entering...\n", func);
	if (stmt && (res = SC_get_Curres(stmt)))
		SC_set_Curres(stmt, res->next);
	if (res = SC_get_Curres(stmt), res)
	{
		stmt->diag_row_count = res->recent_processed_row_count;
		/* insert the following 2 lines */
		stmt->rowset_start = -1; 
		stmt->currTuple = -1;
		/* insert end */
 		return SQL_SUCCESS;
	} 
	return SQL_NO_DATA_FOUND;
}




view thread (4+ messages)

Message-ID: <001901c38036$649c4ca0$3d283ddb@PbgX>
Permalink:  ../001901c38036$649c4ca0$3d283ddb@PbgX/
Also on:    postgresql.org/message-id/001901c38036$649c4ca0$3d283ddb@PbgX

 · 

reply

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: inoue@tpf.co.jp, Dr.Graef@t-online.de
  Subject: Re: problem with multiple result sets
  In-Reply-To: <001901c38036$649c4ca0$3d283ddb@PbgX>
  References: <3F6D8812.2030404@t-online.de> <001901c38036$649c4ca0$3d283ddb@PbgX>

* 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