pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lothar Behrens <lothar.behrens@lollisoft.de>
To: pgsql-odbc@postgresql.org
Subject: Re: Strange problem ?
Date: Tue, 24 Jan 2006 14:25:13 +0100
Message-ID: <c52b0b85411b4e61e455ee31f787c5e6@lollisoft.de> (raw)
In-Reply-To: <20060124121103.GA29043@soptik.pzkagis.cz>
References: <1138056433.236326.34590@o13g2000cwo.googlegroups.com>
	<20060124121103.GA29043@soptik.pzkagis.cz>


Am 24.01.2006 um 13:11 schrieb Ludek Finstrle:

>> I have two computers, each with SuSE 9.1 and unixODBC with psqlodbc
>> 07.03.0200.
>
> Are you sure that both psqlODBC are same?

Yes, at most. I copied the driver from my work notebook to the test box 
- both are SuSE 9.1.
I have compared the unixODBC version - 2.2.8. Had some trouble with the 
psqlpdbcS.so file
not on my test box, I also copied that file (for ODBCConfig) to my 
testbox.

As of that I have a test application (mentioned in my other posts 
here), which works while doing
the same test, my class wrapper may do some things different. I have 
done a strace on the system
calls for both and only find relevant differences in that my 
application (wrapper) seems to hang.

Today I will gather some API logs as of activating them in the driver. 
But not in the next hour.
I hope, which that I can get more information about the differences - 
better than comparing code
or the strace diffs.

Is there a switch to activate the server side logging.

Here are the differences in short:

Dave's plain test:

	retcode = SQLSetStmtOption(hstmt_select, SQL_ATTR_CONCURRENCY, 
SQL_CONCUR_ROWVER);
	if (retcode != SQL_SUCCESS) dbError("SQLSetStmtOption()", 
hstmt_select);
	
	retcode = SQLSetStmtOption(hstmt_select, SQL_CURSOR_TYPE, 
SQL_CURSOR_KEYSET_DRIVEN);
	if (retcode != SQL_SUCCESS) dbError("SQLSetStmtOption()", 
hstmt_select);
	
	UCHAR buf6[] = "drop table regressiontest";
	
	retcode = SQLExecDirect(hstmt, buf6, sizeof(buf6));
	if (retcode != SQL_SUCCESS) dbError("SQLExecDirect()", hstmt);

My wrappers code (AFTER calling SQLExecDirect(...)):

	const int ArraySize = 1;
	SQLUSMALLINT RowStatusArray[ArraySize];

	// Set the array size to one.
	SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER) ArraySize, 
0);
	
	// Why this construct ??
	SQLINTEGER csrType = SQL_CURSOR_KEYSET_DRIVEN;
	
	SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_TYPE, (SQLPOINTER) csrType, 0);
	SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_TYPE, SQL_BIND_BY_COLUMN, 0);
	SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, RowStatusArray, 0);

Is there a problem, when I set the cursor type too last ?

>
>> After a lot of research, I found this message may be a cause:
>>
>> Test system (my program): Set SQL_CURSOR_TYPE as drivers.lie. (Program
>> hang)
>
> Don't you try dynamic cursor? I don't know the code very well but you
> could find it in the code.

Dave's sample works with KEYSET_DRIVEN cursors.

>
>> Any hints ?
>
> You could try 07_03_ENHANCED which Dave announced few days ago.
>

Will try that later. I wonder about that I get such problems. This is 
because I think, I have
the same drivers and so on.

> Regards,
>
> Luf

Regards, Lothar

>
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
>
--
Lothar Behrens	|	Rapid Prototyping ...
Rosmarinstr 3		|	
40235 Düsseldorf  	|	www.lollisoft.de

view thread (5+ messages)  latest in thread

Message-ID: <c52b0b85411b4e61e455ee31f787c5e6@lollisoft.de>
Permalink:  ../c52b0b85411b4e61e455ee31f787c5e6@lollisoft.de/
Also on:    postgresql.org/message-id/c52b0b85411b4e61e455ee31f787c5e6@lollisoft.de

 · 

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: lothar.behrens@lollisoft.de
  Subject: Re: Strange problem ?
  In-Reply-To: <c52b0b85411b4e61e455ee31f787c5e6@lollisoft.de>
  References: <1138056433.236326.34590@o13g2000cwo.googlegroups.com> <20060124121103.GA29043@soptik.pzkagis.cz> <c52b0b85411b4e61e455ee31f787c5e6@lollisoft.de>

* 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