[DB-SIG] ODBC dbiDate and Date() problems

Bob Gailer ramrom@earthling.net
Fri, 24 Jan 2003 19:14:11 -0700


--=======55995B48=======
Content-Type: text/plain; x-avg-checked=avg-ok-344735FE; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

I defined an ODBC System data source in the Windows 2000 ODBC Data Source 
Administrator named "foo" using the Microsoft FoxPro VFP Driver (*.dbf).

 >>> import odbc
 >>> conn = odbc.odbc("foo")
 >>> curs = conn.cursor()
 >>> curs.execute("select start_time from foo")
 >>> row = curs.fetchone()
 >>> row[0]
<DbiDate object at 0x010F9958>

Now what do I do with this object. What are its methods/properties?

I have searched the documentation; there's no reference to odbc in the 
library index or the module index; the DB api specs don't address the 
issue, and searching the Python Site also returns nothing helpful. Even the 
Python 2.1 Bible doesn't address the issue.

Where should I be looking for the documentation.?

This is really confusing. It seems to me it should be easy to find this. 
What am I missing?

I tried:
 >>> dir(row[0])
[]
 >>> r.__class__
...attribute error
 >>> str(r)
'Fri Jan 24 14:55:09 2003'

Finally something useful, but that's a lot of experimenting.

Also having no luck using odbc.Date() to send a timestamp back. Where does 
one get and put the function?

To all of the following I get the same exception:
 >>> odbc.Date
 >>> odbc.date
 >>> odbc.odbc.Date
 >>> odbc.odbc.date
Traceback (most recent call last):
   File "<interactive input>", line 1, in ?
AttributeError: ...


Bob Gailer
mailto:ram

rom@earthling.net
303 442 2625

--=======55995B48=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-344735FE
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/2003

--=======55995B48=======--