ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> db-sig
db-sig
RE: [DB-SIG] Python and database problems
by Max Slimmer other posts by this author
Mar 4 1999 12:15PM messages near this date
[DB-SIG] ANN: mxDateTime Package - Version 1.2.0 | [DB-SIG] Python and database problems
you might be having a problem in the displaying the dates, have you =
tried to
execute a query from the interactive python window
> >> import dbi, odbc
> >> db =3D odbc.ODBC('xxx/xxx/xxx')
> >> cur =3D db.cursor()
> >> r =3D cur.execute("Select * from someTable")
> >> ans =3D cur.fetchone()

then look at values in ans, you have to convert dbiDate values to =
readable
date first.

>  -----Original Message-----
>  From: Tobias H=F6ink [mailto:hoeink@[...].de]
>  Sent: Thursday, March 04, 1999 1:44 AM
>  To: db-sig@[...].org
>  Subject: [DB-SIG] Python and database problems
> =20
> =20
>  Dear "Phythons",
> =20
>  my name is Tobias Hoeink. I am programming for the German Society of=20
>  Physicists in Muenster, Germany. For registration we use CGI-Scripts=20
>  written in Python. We read information from HTML forms and=20
>  put them into=20
>  an Access database. So far there is no problem, everything=20
>  works fine.=20
>  We use two fields for dates in this Access database and this is where =

>  something very strange happens:
>  While reading dates out our database the date somehow changes=20
>  into the=20
>  date of the day before. As this seems to be a systematical=20
>  error which=20
>  occurs somewhere between Python and ODBC we were not able to=20
>  handle it.
> =20
>  To get in tough with our problem please look at
>  http://dpg-akf.uni-muenster.de/dpg/dpg_liste.html
>  and search e.g. for member number (Teilnehmernummer) 478. The=20
>  returning
>  page=20
>  will show you two dates. Both are exact one day before the=20
>  day saved in=20
>  our database. If you search the name "Nink" (field Nachname) an other =

>  listing will be presented with the same effect. I asure you that the=20
>  original dates in this recordset are saved with anmeldedatum=20
>  =3D 02/25/199
>  and=20
>  kartendatum =3D 03/25/1999.=20
>  This problem occurs on any date we read out of the database!
> =20
>  Please let us know what the mistake is and how we can solve=20
>  the problems=20
>  that are concerned with that.=20
>  =20
>  I would also be interested if we are the only ones presented to this
>  effect.
> =20
>  Thank you very much.
> =20
>  I hope to hear from you soon. =20
> =20
>          Sincerely Yours,
> =20
>                  Tobias Hoeink
>  --=20
>  *************************************************
>  	Tobias H=F6ink			=09
>  	Heekweg 12, E408		=09
>  	48161 M=FCnster=09
>  	GERMANY		=09
>  	phone: +49-251-868852	=09
>  	email: hoeink@uni-muenster.de=09
>  *************************************************
> =20
>  _______________________________________________
>  DB-SIG maillist  -  DB-SIG@[...].org
>  http://www.python.org/mailman/listinfo/db-sig
> =20
Attachments:
unknown1


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved