[python-win32] Copying a MS Access Table

sebastian.venus at uk.bnpparibas.com sebastian.venus at uk.bnpparibas.com
Wed Jul 29 16:23:01 CEST 2009


Thanks.
I solved this now. The first argument in CopyObject should simply be the 
file path to the database being accessed.





Internet 
mail at timgolden.me.uk
29/07/2009 09:23

To
Sebastian VENUS, python-win32 at python.org
cc

Subject
Re: [python-win32] Copying a MS Access Table






[copying back to the list]

> Not sure how to reply to the thread, since I thought that if I reply to 
> "python-win32 at python.org" then it would start a new thread? 

Replying to python-win32 at python.org is the right thing to
do; the mailing list software should recognise all the
clues it needs to continue the thread.


sebastian.venus at uk.bnpparibas.com wrote:
> Hi Tim,
> 
> I tried this:
>>>> a = win32com.client.Dispatch("access.application")
>>>> connStr = 'Driver={PostgreSQL 
> Unicode};Server=%s;Database=%s;Uid=%s;Pwd=%s;ConnSettings="set TimeZone 
to 
> -8; set search_path to pid,public;"'

Well that surprised me: you're using Access as a frontend
to PostgreSQL? 

>>>> a.OpenCurrentDatabase(r'C:/TEMP/db1.mdb')
>>>> a.DoCmd.CopyObject(connStr,'MyTable2',0,'MyTable1')
> 
> but it threw an exception that I couldn't interpret. Can you please 
help? 

This is obviously tricky with two different databases in 
the equation, one of them PostgreSQL, but what will be
most helpful is for you to produce an easily reproducible
sample which someone else can run, plus the traceback you
get. Going through this exercise may even cause you to
track down the problem yourself. In particular, try to
eliminate external dependencies: try to do the copy table
thing between two Access databases, or within the same
one (if that's possible; I haven't used Access in earnest
for a while now).

TJG



--------

This communication is confidential, may be privileged and is meant only for the intended recipient. If you are not the intended recipient, please notify the sender by reply and delete the message from your system. Any unauthorised dissemination, distribution or copying hereof is prohibited.

BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited, BNP Paribas Commodity Futures Limited, BNP Paribas Asset Management UK Limited and Investment Fund Services Limited are authorised and regulated by the Financial Services Authority.

BNP Paribas London Branch and BNP Paribas Wealth Management London Branch are authorised by the CECEI and supervised by the Commission Bancaire.  

BNP Paribas London Branch is authorised and subject to limited regulation by the Financial Services Authority. Details about the extent of our authorisation and regulation by the Financial Services Authority are available from us on request. BNP Paribas is also a member of the London Stock Exchange.

BNP Paribas Wealth Management London Branch is subject to limited regulation by the Financial Services Authority.  Details about the extent of our authorisation and regulation by the Financial Services Authority are available from us on request.  

BNP Paribas Securities Services London Branch is authorised by the CECEI and supervised by the AMF, and subject to limited regulation by the Financial Services Authority. Details on the extent of our regulation by the Financial Services Authority are available from us on request. BNP Paribas Securities Services is also a member of the London Stock Exchange.

BNP Paribas Trust Corporation UK Limited is registered in England and Wales (registered no. 4042668) at registered office 55 Moorgate, London EC2R 6PA.

BNP Paribas UK Limited is registered in England and Wales (registered no. 1488108) at registered office 10 Harewood Avenue, London NW1 6AA.

BNP Paribas Commodity Futures Limited is registered in England and Wales (registered no. 2391477) at registered office 10 Harewood Avenue, London NW1 6AA.

BNP Paribas Asset Management UK Limited is registered in England and Wales (registered no. 2474627) at registered office 10 Harewood Avenue, London NW1 6AA.

Investment Fund Services Limited is registered in England and Wales (registered no. 6110770) at registered office 55 Moorgate, London EC2R 6PA.

BNP Paribas London Branch is registered in England and Wales (registered no. FC13447) at registered office 10 Harewood Avenue, London NW1 6AA.

BNP Paribas Wealth Management London Branch is registered in England and Wales (registered no. FC023926) at registered office 10 Harewood Avenue, London NW1 6AA.

BNP Paribas Securities Services London Branch is registered in England and Wales (registered no. BR006393) at registered office 55 Moorgate, London, EC2R 6PA.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090729/f43add67/attachment.htm>


More information about the python-win32 mailing list