Time objects and ADO

John notehead2 at hotmail.com
Sun May 6 01:46:59 EDT 2001


Great! Thanks!

-John

"dsavitsk" <dsavitsk at e-coli.net> wrote in message
news:Ck4J6.9823$R2.8443312 at newsrump.sjc.telocity.net...
> if this is really what you are looking for, here's a list of them ...
> http://www.activeserverpages.ru/ADO/daprop06_4.htm
>
> doug
>
>
> "dsavitsk" <dsavitsk at e-coli.net> wrote in message
> news:894J6.9817$R2.8431874 at newsrump.sjc.telocity.net...
> >
> > "John" <notehead2 at hotmail.com> wrote in message
> > news:LX2J6.43$6N5.13988 at newsread2.prod.itd.earthlink.net...
> > > Okay, I'm part of the way there. I located the mx extensions from Marc
> > > Lemburg ( http://www.lemburg.com/files/python/ )that handle COM dates.
> > >
> > > Here is what I am doing now. All this works the way I want it to
> > > functionality-wise, but the type check part is a hack:
> > >
> > > item = recordset.Fields.Item(j).Value
> > >
> > > # There has to be a better way to tell the type
> > > # of the time object than this!!!
> > > # Seems like this should be the way to do it, but it doesn't work...
> > > #                 if type(item) is DateTimeType:
> > >
> > > if str(type(item)) == "<type 'time'>":
> > >     # Use the string representation of the time
> > >     item = str(DateTimeFromCOMDate(item))
> > >
> > >
> > >
> > > Any help on figuring out how to do the type check would be much
> > appreciated.
> > >
> > > -John
> > >
> >
> > the Fields object has a type method (is that what you call it?).  you
can
> > query it using
> >
> > >>> type = rs.Fields.Item(j).Type
> >
> > it should return an integer value.  i don't know the actual constants,
but
> > Text is 202.  probably play with them for a while and you can figure
them
> > out.
> >
> > doug
> >
> >
>
>
>





More information about the Python-list mailing list