[python-win32] Problems using JET SQL CREATE

George Vestergom unifoam@total.net
Fri, 19 Jul 2002 09:32:02 -0400


"Kunkle, Rob E" wrote:
> 
> Hi George -
> 
> I know the Access tables have a property that says whether or not they are
> Visible in the database window. Maybe ADO does not do this by default?
> 
> I can't find the details of this, but it could be that you just need to
> somehow manipulate the extended properties of the table object and flip a
> switch. Probably ADOX is your best bet to get more control of the objects.
> 
> Rob
---------------------------------------

"Jorgensen, Jens" wrote:
> 
> George,
> 
> Although I can't be certain I'm going to guess that the differences in behavior between >Python and VBS are occuring because when you are executing the statements in Python the >objects do not get deleted and somehow the data is not being written through to the file. Some >of the scenarios support this and others contradict it but I still believe this is the case. >Since the interface is COM the COM objects themselves don't know if python is calling them or >VBS is and the results should be no different. Try putting your statements into a .py file and >running the scripts with python.exe rathen than pythonwin. Any difference observed then?
> 
> BTW I use ADO myself and manipulate Jet databases fairly often and at times use Access in >tandem and haven't seen any problems like this. You can create new Jet databases too, you just >use ADOX. ADOX also let's you get lists of tables, etc.

------------------------------------------------------------
------------------------------------------------------------
Thank you Jens and Rob:

False Alarm! JET SQL statements works with Python. My mistake.

Thank you for your response to my problem. After looking at my code
(again!), I found the error and it turned out to be a stupid path
problem (same database, wrong folder!). 

I took your suggestion by putting my statements in a .py file and
running the script, and thats where I discovered the problem. In fact,
the JET SQL statements works within IDLE/Pyhonwin without problem. 

The interactive environment provided by Python allows for a simpler and
faster 
understanding of DAO, Excell, and Word objects and collections (and ADO,
I'm sure) than using a VBA module in ACCESS and trying things out in the
Immediate window.

Thanks again for the help,
George Vestergom