ASP + SQL Server + Time object problem

Tim Hammerquist tim at degree.ath.cx
Fri Jan 12 21:46:32 EST 2001


abramsjc at my-deja.com <abramsjc at my-deja.com> wrote:
> I'm using Python in ASP, and I have a recordset that returned a
> <time object at FFblah> object.
> 
> However I can't seem to convert this to an int or float.
> If I Responsd.Write it out it comes out correct, '3/31/00',
> but internally I can't seem to do anything with it.

When you say you Response.Write() it, do you mean:
	Response.Write(obj)

or
	Response.Write("Time: " + obj)

...  This is important.  The Response.Write() method can automatically
deal with objects like this, but in ASP languages other than VBScript
and JScript, you may have to dereference the data you're actually trying
to get.  I ran into this when I was writing my ASP.pm Perl module.  In
VBScript you can:

	Response.Write "Form data: " & Request.Form("data")

But in PerlScript, you have to:

	$Response->Write("Form data: ".$Request->Form("data")->{Item});

This is either Micro$oft's fault for making VBScript so mysteriously
simple, your the user's for trying to treat an actual COM object as a
string...  Probably a combination of both, since MS never feels the need
to document anything sufficiently (if at all).  ;)

Anyone in the newsgroup familiar with the object model of a "time
object"?

-- 
-Tim Hammerquist <timmy at cpan.org>
It does not matter how you meet Mister or Miss Right. The
mystery is what keeps two people together after they meet.
	-- from Next Stop Wonderland



More information about the Python-list mailing list