pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: daniel.machet@accenture.com
To: h-inoue@dream.email.ne.jp
Cc: tsunakawa.takay@jp.fujitsu.com
Cc: e.ratnakar.shetty@accenture.com
Cc: pgsql-odbc@postgresql.org
Subject: Re: Issue with Save and Release points
Date: Wed, 22 Jun 2016 11:00:05 +0000
Message-ID: <3fa51a49372944928cdcfe264d01a0c5@SN4PR4207MB0382.048d.mgd.msft.net> (raw)
In-Reply-To: <576A6CF6.6030106@dream.email.ne.jp>
References: <2469e362195c475898c777212b68b244@CO2PR4202MB0281.048d.mgd.msft.net>
	<0A3221C70F24FB45833433255569204D1F595BEB@G01JPEXMBYT05>
	<78e9da35a70c4ff1bfce5bde393934fc@SN4PR4207MB0382.048d.mgd.msft.net>
	<57647FB5.6020001@dream.email.ne.jp>
	<459e27de37af434388e31f95aca14b82@SN4PR4207MB0382.048d.mgd.msft.net>
	<5767F085.8050808@dream.email.ne.jp>
	<5ccb64c391ce49fc9ca27e7c0d23c156@SN4PR4207MB0382.048d.mgd.msft.net>
	<57687B46.9000400@dream.email.ne.jp>
	<d0607662edb44c6c9887f56e6d1f07bc@SN4PR4207MB0382.048d.mgd.msft.net>
	<576A6CF6.6030106@dream.email.ne.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Thanks again Hiroshi,


This has given me some direction, I’ll try recode to use a prepared statement (from a little googling this seems to imply using CreateQueryDef()
on vba… its for a word vba script but should be same across office)

I’ll also check if there are alternatives to DAO for opening the database connection… most likely this will be a bridge too far changewise but at least I’ll learn something

Regards
Dan

________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

Accenture means Accenture (UK) Limited (registered number 4757301), registered in England and Wales with registered address at 30 Fenchurch Street, London EC3M 3BD.


From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
Sent: 22 June 2016 11:48
To: Machet, Daniel <daniel.machet@accenture.com>
Cc: tsunakawa.takay@jp.fujitsu.com; Ratnakar Shetty, E. <e.ratnakar.shetty@accenture.com>; pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Issue with Save and Release points

Hi Daniel,
On 2016/06/21 17:33, daniel.machet@accenture.com<mailto:daniel.machet@accenture.com> wrote:
Thanks Hiroshi,

Is there anywhere I can do some reading up about the SQLStatistics() function and how to cache its results so that ODBC doesn’t need to run these repeatedly for each statement? Will I be able to call SQLStatistics() from VBA?

One way is to PREPARE an insert statement and EXECUTE the PREPARED statement repeatedly.




On a separate note – another way to tackle this might be to issue bulk insert statements but my approach so far has been to issue bulk statements using the postgres syntax from vba

i.e. to populate a string with an insert statement like

INSERT INTO tblA(field1, field2) VALUES
(1, 999),
(2, 888);

And to issue via the driver using following:

ThisDB.Execute strSQL, dbFailOnError


ThisDB is created using :

Set ThisDB = OpenDatabase("", False, False, DBName)

But I keep getting a syntax error for missing ; even though this exact query works on pgAdmin

OpenDatabase() seems a DAO method.
Unfortunately it seems DAO( or Access) doesn't allow to insert multiple rows.

regards,
Hiroshi Inoue


view thread (16+ messages)  latest in thread

Message-ID: <3fa51a49372944928cdcfe264d01a0c5@SN4PR4207MB0382.048d.mgd.msft.net>
Permalink:  ../3fa51a49372944928cdcfe264d01a0c5@SN4PR4207MB0382.048d.mgd.msft.net/
Also on:    postgresql.org/message-id/3fa51a49372944928cdcfe264d01a0c5@SN4PR4207MB0382.048d.mgd.msft.net

 · 

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: daniel.machet@accenture.com, h-inoue@dream.email.ne.jp, tsunakawa.takay@jp.fujitsu.com, e.ratnakar.shetty@accenture.com
  Subject: Re: Issue with Save and Release points
  In-Reply-To: <3fa51a49372944928cdcfe264d01a0c5@SN4PR4207MB0382.048d.mgd.msft.net>
  References: <2469e362195c475898c777212b68b244@CO2PR4202MB0281.048d.mgd.msft.net> <0A3221C70F24FB45833433255569204D1F595BEB@G01JPEXMBYT05> <78e9da35a70c4ff1bfce5bde393934fc@SN4PR4207MB0382.048d.mgd.msft.net> <57647FB5.6020001@dream.email.ne.jp> <459e27de37af434388e31f95aca14b82@SN4PR4207MB0382.048d.mgd.msft.net> <5767F085.8050808@dream.email.ne.jp> <5ccb64c391ce49fc9ca27e7c0d23c156@SN4PR4207MB0382.048d.mgd.msft.net> <57687B46.9000400@dream.email.ne.jp> <d0607662edb44c6c9887f56e6d1f07bc@SN4PR4207MB0382.048d.mgd.msft.net> <576A6CF6.6030106@dream.email.ne.jp> <3fa51a49372944928cdcfe264d01a0c5@SN4PR4207MB0382.048d.mgd.msft.net>

* 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