Linux guy seeks help w/MS Access/Python

Quasimodo KILLzdramboSPAMMERS at zdnetmail.com
Mon Aug 21 13:16:15 EDT 2000


Just occured to me after previous posting.  If you're looking for ways to
manipulate MS Access objects (e.g. start up apps, create and kill forms,
etc. basically non-SQL manipulation), you can do it through Python and COM
(module win32com. ) which gives you the type of access you'd have using
Visual Basic for Applications.

An excellent book on this is "Python Programming on Win32" - O'Reilly:
written by Hammond and Robinson.

Jose



"G. David Kuhlman" <dkuhlman at netcom.com> wrote in message
news:8nrn57$p7h$1 at slb1.atl.mindspring.net...
> Download and install the Python MS Windows extension from
> www.python.org.
>
> Read about the Python DB API in the DB-SIG at
> http://www.python.org/sigs/db-sig/.
>
>
> Then do something like the following:
>
>
> >>> import dbi, odbc
> >>> connection = odbc.odbc('People')
> >>> cursor = connection.cursor()
> >>> cursor.execute('select * from People')
> 0
> >>> print cursor.description
> [('id', 'NUMBER', 11, 10, 0, 0, 0), ('name', 'STRING', 50, 50, 0,
> 0, 1), ('phone
> ', 'STRING', 50, 50, 0, 0, 1), ('street', 'STRING', 50, 50, 0, 0,
> 1), ('city', '
> STRING', 50, 50, 0, 0, 1), ('state', 'STRING', 50, 50, 0, 0, 1),
> ('zip', 'STRING
> ', 50, 50, 0, 0, 1)]
> >>> rows = cursor.fetchall()
> >>> for row in rows: print row
> ...
>     o
>     o
>     o
> >>> cursor.close()
> >>> connection.close()
> >>>
>
>
>
>
>
> Albert Wagner (alwagner at tcac.net) wrote:
> > I'm on a linux system, but have just taken a job in a windows shop. Is
> > there a way to manipulate MS Access within Python?  Can you point me
> > towards appropriate docs?
> >
> > --
> > We didn't inherit the land from our fathers.
> > We are borrowing it from our children.





More information about the Python-list mailing list