newbie database question

Steve Holden sholden at holdenweb.com
Wed Jan 9 09:34:33 EST 2002


"james kowalka" <jkowalka at nycap.rr.com> wrote in message
news:YSX_7.37074$qv.6280319 at typhoon.nyroc.rr.com...
> I did get the dynwin package, but was unable to get it properly installed.
> But you mentioned something I hadn't thought about.  ADO would enable me
to
> do this better.  Whats the easiest way to use ADO with python?
>
> "Bill Tate" <tatebll at aol.com> wrote in message
> news:cb4ba455.0201090416.74263ebc at posting.google.com...

[ODBC/.DBF advice from Bill and Steve]

> > Thanks Steve,
> > James - you may also want to look at Sam Rushing's Dynwin package.  It
> > has lots of good stuff in it including an odbc module that exposes
> > alot more of the odbc api. I would recommend this version if you plan
> > on using ODBC rather than say oledb, ado, etc.
>
James:

It helps if you put your answers at the bottom, not the top ... everything
reads more sensibly if someone comes in halfway through the story :-)

I surmise from your recent postings that you are new to database - correct?
Your previous question to Bill ("How do I just amend a single row in a
table") implies you don't know SQL. If that's the case then you should think
about learning it -- there's a few good interactive tutorials on the web,
and "Python Web programming" (due out next week!) includes some introductory
material.

I seem to remember that the Dynwin package exposes a pretty low-level ODBC
interface, so I think you'd be better of steering clear of it. It will give
you closer control than you really need, and probably take too much
learning. Bill's experience may differ, part of this is based on hearsay!
ADO is all right, but it can be counter-intuitive in Python and because it
relies on COM you need the Win32all extensions anyway to use it.

Your best bet is almost certainly to go with the dbi and odbc modules from
Win32all for simple needs, or mxODBC if things get a little more
complicated. Note that mxODBC is free for personal use only.

Finally, you may find that the DBF drivers you can lay your hands on will
only read DBF files, not write them (this is a guess, you may be pleasantly
surprised, but I'd recommend you keep backup copies of your DBFsbefore you
start experimenting). There are certainly some Python modules which will
read (but not write) DBFs - take a look in the Vaults of Parnassus for
references. Overall you might find it more satisfactory to migrate your DBF
files to something properly relational. I recently started working with
MySQL on Windows and was pleasantly surprised.

Hope all this helps, and doesn't put your brain into overload. Good luck,
and let the group know when you've made some progress.

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list