Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrxQk-0006Bz-Ex for pgsql-odbc@arkaria.postgresql.org; Fri, 20 May 2022 07:52:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrxQj-0001ww-9i for pgsql-odbc@arkaria.postgresql.org; Fri, 20 May 2022 07:52:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrxCc-0006Fw-T1 for pgsql-odbc@lists.postgresql.org; Fri, 20 May 2022 07:37:39 +0000 Received: from mail-eopbgr140113.outbound.protection.outlook.com ([40.107.14.113] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrxCZ-0002Pf-Il for pgsql-odbc@postgresql.org; Fri, 20 May 2022 07:37:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L5etBPKkL21JmQ+X1NC6S3LHkFLIqCTsGoeR7S2fdEKh2e+Qeri3XRCvvprG6u6bnClsBj+Y+C+lP39ylZENkLM+6hDU3MLcFpEiWuZ/flB1PnGRYVqaoYnfupHHB5WB32OizT8JWf1z8GWt56QBpqFQTWQFZpeSeoDH1N8TirJ1JMA67uGZgcOyw6ia4RFh2+KW0rs2p6OPL+yEybOu/iB+KzqZLFOP72HJSW36SjVlVJgiS3HyChhqc5QRfOqorcDTZl/fs9VIxSqa7/mw4Pg/NFQ0DfDS5nrmU1JgFzOnwg6XeJsYruq2q+N4EAIj+ePYeHTYwR1jvVpSPEEfZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9u5+SZHTVnsCVYOXY3NBGW6C2wdGfWPEQDUvVw1ePr4=; b=LxyG2B9aBH/GIP5PEal+tieoUou3wZzTpnkdJ1NL7CZccD2Ls9temJ/AGLYZq4pu8cZKGGtrxnjrSP4/OizbxuLwV6aWAfu1Qzk8ybzS0FzB7YJ4dyUbD3ZGfqoPERFjZ+5dA3hzGyRQ8bzqBTEkCvO8IycmbD6mOlhraPrgxX8b/PFb/2SL0s3vtc3rIKBNg+lbBpzD23IcTZ27Z2PUttNojBK90dWKX+IiAAkoriyFSqjCE+wrhmVxnhWNqxgM5gL/QczTtK1Yj89uNLCG83yxedwHhW6m9BU6j9nikVx5r43lyRxcc23MIdgH/jlw60un2mbxD8BHzWQZ7cIyPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=remira.de; dmarc=pass action=none header.from=remira.de; dkim=pass header.d=remira.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=remira.onmicrosoft.com; s=selector2-remira-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9u5+SZHTVnsCVYOXY3NBGW6C2wdGfWPEQDUvVw1ePr4=; b=U7jyXPDF47xdBiWgAbx5ZGT/XzderEiyFbv0EzgbqmLqTK82r4e1PjqgHnz7OltrDgF3wTNmTJ75jeJGsDycVaFRaSr2d0Nu+IjueamAr4gWzTPAG5+V2aiY9A/gJTUJOJBV3Ih7ZHa9Rx3oswctxuKKrEOQ860xydtl6+ERtAw= Received: from AM0PR09MB3812.eurprd09.prod.outlook.com (2603:10a6:208:182::12) by DU2PR09MB5246.eurprd09.prod.outlook.com (2603:10a6:10:2b7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Fri, 20 May 2022 07:37:32 +0000 Received: from AM0PR09MB3812.eurprd09.prod.outlook.com ([fe80::256a:96e0:fc1c:502f]) by AM0PR09MB3812.eurprd09.prod.outlook.com ([fe80::256a:96e0:fc1c:502f%5]) with mapi id 15.20.5273.017; Fri, 20 May 2022 07:37:32 +0000 From: Dirk Hasenbrink To: "pgsql-odbc@postgresql.org" Subject: Bug in psqlodbc 13.02? Bulk updates + ODBC function SQLRowCount(...) Thread-Topic: Bug in psqlodbc 13.02? Bulk updates + ODBC function SQLRowCount(...) Thread-Index: AdhsDpj9MfIkrCOdRXymwgxnVT6Dnw== Date: Fri, 20 May 2022 07:37:32 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=remira.de; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cd618739-0768-43d9-88d9-08da3a3399cc x-ms-traffictypediagnostic: DU2PR09MB5246:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9CsLFNa7CwELctJxOUzwHbyLD+23CG22nMc6Rja+bfctIlgMmvWLESsch5M1dMClJiYCuk2DFFC+EqikuFW0awE1POruc3iLKiGwcwHIa4isu4JcNvfDPsWtLhSJDZSKLxMtZywryKDhcuzFnaqNepMnPfNA79at2xrLimbVvOPuyuFQ3KSPhjPbYDCI4QmAW+PYsN3negMYYiVP5GMtxvhB+aBvR3889D3d5LXfpjPU9QJU4sAXYzhEjeinKFH8DRvOPUBkf5yLjNL7fodrB9KnHXbIN8UU5B93Pa8bKC+8Stq6N4yhKR1S5sDmWCyw82xR/Ao+3IDcrrEGM+0qefsAU7N8OyGz+nkRqpf5awE/ICm9zYKkg2idywl+R0sMUidjoVf5W10ZAzDl/3eE99mL4isA7+a11jV4uQAdu6YZB8Gz1HXlYJgzIsbGJ/l7uQxWudsGgwCXNDADOmZT+0QmCqISm8B/YJ3+Wv9A4INxSDtkZ70yVg/ZJboQa9FxNZQsQyj4eHCYXHXXXG18WKiGaxx8zJa+jK/Clec86nXPM4lNkTDibatwBy5XGw6DN522WMGY42OD61BgzvwtL5Bz57xs/D4gHQB+CBj+Z2xHU5akR0GZySzmTRZJz3yeZYlivG7W60znSg0m/KyDraphXE4WAqC0yQR8PVKQDrqk1XHqeB+ZfnGR70iZO5MK6L3xIdvkt3aM15HB1UzMPJTWBmD8ggIiFj8OpHgkKwEC9P192cVJ1zK9jEiA2SlTFmQ7Hwog7s8SfX0hKXZ63Epa7SEgpZNazpubLquCgYDRQnU6MQ9tSFnARl1Oi2+U5hI6FR3mhEIjI/YYZW34QQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR09MB3812.eurprd09.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(396003)(39850400004)(346002)(136003)(376002)(8676002)(7696005)(6506007)(33656002)(55016003)(83380400001)(86362001)(38100700002)(64756008)(71200400001)(38070700005)(2906002)(52536014)(9686003)(26005)(8936002)(122000001)(15650500001)(41300700001)(5660300002)(66574015)(66556008)(166002)(6916009)(19627235002)(186003)(44832011)(66446008)(66476007)(66946007)(508600001)(76116006)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?r3ksXl8mSbilXB+FHX+pZF3WO8cQNr5RZ4yveNOdtr0Ucepf0ADcqNIiFX?= =?iso-8859-1?Q?XR6UPUa8VjzoMtraQT7ABjSXaSzicyqe9xyEhw6zZqdgcRsFMNtAkCj9rL?= =?iso-8859-1?Q?N9SWj/O48eLaCJxRTQFT0usSxOBx6nDIg2L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-1?Q?JV2cxQIQLtuvvkyGSwtcDA9XviPg3JfP3m6cXWsTTBKwwScFZ3DtfF/c0P?= =?iso-8859-1?Q?uBgWuIX1LermKUcp7zY84L+cShra3/nnxUIBMVRy32JvaPcZ15yeoxWUBZ?= =?iso-8859-1?Q?UiIgwuYg/lHQ9bR+6QAYZLUZ1aVBr0uyCf5JnXXsPdw3guMaHEmUSEN+LA?= =?iso-8859-1?Q?YTFmpbMy6Mzx5tRB/7sCxe+un8ZQ3XyEhlQO/BcWID7OCsQtTi7+0052sL?= =?iso-8859-1?Q?Wp2/gZ5y2DoS1dA+dWrhRZEwDmyyluNuNoZXL2X4HWyLYdifRJ6mZ1uiQI?= =?iso-8859-1?Q?RotN+wNa+2TDSHc3endTsvD/pUtC14dB+3f0aGgZ7a0hS37V+lYr6CBc/g?= =?iso-8859-1?Q?QQtUe2LI+QRNbdIga3TiFrsqkT6h0LhcUPXlqVZqdaGvEfuTNTJ+dyw8GU?= =?iso-8859-1?Q?1AW/QWGB8rgnr7inH6WPFQJI4s7sTcHb6Ekh2AnDReDjPnjgDoDrjEUYQJ?= =?iso-8859-1?Q?ddBF5c5z9rYugjGuormrF0zlzVU0yyFDiJGtpKhWVvDmOx/Jao3D3rt/e8?= =?iso-8859-1?Q?WldLZneHZfVBNzrlFsORzoxsiFinfiG+v2D77JjhgNiW70aZTIGRSfp5tX?= =?iso-8859-1?Q?tvzYdW8KieOML0wHADX0K9mI61sZE2NqPaE11ZEIrZPYjLJrn7XwJxjYZl?= =?iso-8859-1?Q?YoNtHxACMLHNe2RWe1G0BOQX/LDJphSjjDTRqPVdW2FB9i0XU77Zl4tQUi?= =?iso-8859-1?Q?q2xFe8TA/NRichAsaiqBOTleIrxYSRjCMgkEu1CsquCI/gI2ICeucd0Xud?= =?iso-8859-1?Q?CTdyfPJyfw=3D=3D?= Content-Type: multipart/alternative; boundary="_000_AM0PR09MB3812C2CD838DB01DFEC5B8D3E2D39AM0PR09MB3812eurp_" MIME-Version: 1.0 X-OriginatorOrg: remira.de X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR09MB3812.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd618739-0768-43d9-88d9-08da3a3399cc X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2022 07:37:32.4095 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7b65cdbd-bf50-49b8-b2a3-01f5175552d0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CrlUDovhAWo9+2nMv9BOdBfc6WGpEQSJwGNDLo9Y/Od16twxWVfmwaWQ2qfXqKzwUJDZ0pvUnLFkrdRuCCVhdy2+Fd8UIa5kujoFJF7T9iU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR09MB5246 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_AM0PR09MB3812C2CD838DB01DFEC5B8D3E2D39AM0PR09MB3812eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Good morning, we would like to connect our C++-application, which can be connected to var= ious databases (SQL Server, Oracle , MySQL ...) via ODBC, also with a PostgreSQL 14. We are currently using the ODBC driver psqlodbc Unico= de(x64) 13.02. Everything works fine except for one problem, which we can't solve. We use bulk insert operations and bulk update operations with arrays in our= application and set the following for the attributes: retcode =3D SQLSetStmtAttr(stmt, SQL_ATTR_PARAM_BIND_TYPE, SQL_PARAM_BIND_B= Y_COLUMN, 0), SQL_ATTR_PARAMSET_SIZE, SQL_ATTR_PARAM_STATUS_PTR and SQL_ATTR_PARAMS_PROC= ESSED_PTR In our application we need the number of affected rows. We query this with = the ODBC function SQLRowCount(...). However, the ODBC driver psqlodbc always returns only a "1", although several updates or= inserts were executed. Can you tell us why only 1 is always returned? Othe= r ODBC drivers from other suppliers return the correct numbers of effected ro= ws. Does any parameter or options still need to be set? Or is it a bug? Thank you in advance. Best regards, Dirk Mit freundlichem Gru=DF aus Dortmund Dirk Hasenbrink Team Lead New Technologies [https://mailtasticcdn.azureedge.net/img/images/siglinks/company/4b62548f-e= 1c8-44fc-a0d6-51c5de35035c/u_logo-XukoQU7xBJ.png] t +49 231 997 82 028 dirk.hasenbrink@remira.de www.remira.com [https://mailtasticcdn.azureedge.net/img/images/siglinks/company/4b62548f-e= 1c8-44fc-a0d6-51c5de35035c/u_xing-85vtGaAslp.png] [https://mailtasticcdn.azureedge.net/img/images/siglinks/company/4b62548f-e= 1c8-44fc-a0d6-51c5de35035c/u_linkedin-m569aSm5Dm.png] [Instagram] [https://mailtasticcdn.azureedge.net/img/images/siglinks/company/4b62548f-e= 1c8-44fc-a0d6-51c5de35035c/u_fb-sPFVqLx6I2.png] [0] REMIRA Group GmbH | Phoenixplatz 2 | 44263 Dortmund Amtsgericht Dortmund I HRB 31900 I Gesch=E4ftsf=FChrer: Stefan Braatz, Oliv= er Jenneskens, Stephan Unser Im Rahmen dieser Korrespondenz werden Ihre personenbezogenen Daten verarbei= tet. Hier gelangen Sie zur Datenschutzerkl=E4rung. Your personal data will = be processed as part of this correspondence. More information in our Data P= rotection policy. --_000_AM0PR09MB3812C2CD838DB01DFEC5B8D3E2D39AM0PR09MB3812eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Good morning,

 

we would like to connect our C++-application, which = can be connected to various databases (SQL Server, Oracle , MySQL ...) via = ODBC, also

with a PostgreSQL 14. We are currently using the ODB= C driver psqlodbc Unicode(x64) 13.02. Everything works fine except for one = problem,

which we can't solve.

We use bulk insert operations and bulk update operat= ions with arrays in our application and set the following for the

attributes:

retcode =3D SQLSetStmtAttr(stmt, SQL_ATTR_PARAM_BIND= _TYPE, SQL_PARAM_BIND_BY_COLUMN, 0),

SQL_ATTR_PARAMSET_SIZE, SQL_ATTR_PARAM_STATUS_PTR an= d  SQL_ATTR_PARAMS_PROCESSED_PTR

 

In our application we need the number of affected ro= ws. We query this with the ODBC function SQLRowCount(...). However, the

ODBC driver psqlodbc always returns only a "1&q= uot;, although several updates or inserts were executed. Can you tell us wh= y only 1 is always returned? Other

ODBC drivers from other suppliers return the correct= numbers of effected rows. Does any parameter or options still need to be s= et? Or is it a bug?

 

Thank you in advance.

 

Best regards,

Dirk

 

Mit freundlichem Gru=DF aus Dortmund

Dirk Hasenbrink
Team Lead New Technologies

=

t +49 231 997 82 028
dirk.hasenbrink@remira.de
www.remira.com

3D"Instagram"

3D"0"

REMIRA Group GmbH | Phoenixplatz = 2 | 44263 Dortmund

Amtsgericht Dortmund I HRB 31900= I Gesch=E4ftsf=FChrer: Stefan Braatz, Oliver Jenneskens, Stephan Unser

Im Rahmen dieser Korrespond= enz werden Ihre personenbezogenen Daten verarbeitet. Hier gelangen Sie zur Datenschutzerkl=E4rung. Your personal data= will be processed as part of this correspondence. More information in our = Data Protection policy.

 

--_000_AM0PR09MB3812C2CD838DB01DFEC5B8D3E2D39AM0PR09MB3812eurp_--