[DB-SIG] experimentation with access using win32com.client
kromag@nsacom.net
kromag@nsacom.net
Fri, 25 May 2001 16:52:53 -0700 (PDT)
Hi all,
*NEWBIE ALERT*
I have been having some fun with win32com.client and access 7 using the dandy
examples at http://starship.python.net/crew/bwilk/access.html.
Everything seems crystal clear to me for writing to the database. The weird
thing is, I can't seam to get a human-readable query. I have tried the
following:
>>> import win32com.client
>>> engine=win32com.client.Dispatch("DAO.DBEngine.35")
>>> db=engine.OpenDatabase("\windows\desktop\db2.mdb")
>>> rs=db.OpenRecordset("select beans from food where corn='39114'")
## I know the value exists!
>>> rs
<COMObject OpenRecordset>
Hrm. Now shouldn't this display the output from my query? I have done similar
stuff with postgresql with success (unless I am hallucinating- not an
unwarranted assumption....) As I recall, when performing a similar act using
pygresql and postgres in IDLE on Linux, I could not get the actual output of
the query, only a <stuff> type message.
I am sure I am missing something obvious! :-/
Thanks!
d