[DB-SIG] DbiDate testing for None

js@ac-copy.com js@ac-copy.com
Thu, 5 Mar 1998 13:53:18 +0100


Hello,

I now changed the SQL-statement to insert the date value as DateTime-Instance,
and now it works, without the print-statement.

It also gave an error message when I inserted a date-value as
dbiDate.timevalue. this time the error-message is:

   self.dialog = Pmw.MessageDialog(self.parent, title = 'Add Info',
   exceptions.AttributeError: __float__
   
I hope this provides some hints, where the cause may be. 

Mit freundlichen Grüßen

    Joachim Schmitz

+------------------------------------------------------------------------+
| AC COPY IfD GmbH                             Telefon: 49-2404-908390   |
| Joseph-von-Fraunhofer-Straße 3d              FAX:     49-2404-908399   |
| D-52477 Alsdorf                              e-Mail:  js@ac-copy.com   |
| http://www.ac-copy.com                       ftp://ftp.ac-copy.com     |
+------------------------------------------------------------------------+


-- 
|From lemburg@uni-duesseldorf.de  Wed Mar  4 19:35:21 1998
|Date: Wed, 04 Mar 1998 18:52:59 +0100
|From: "M.-A. Lemburg" <lemburg@uni-duesseldorf.de>
|Organization: SCM: http://starship.skyport.net/~lemburg
|To: js@ac-copy.com
|Subject: Re: [DB-SIG] DbiDate testing for None
|
|perry@ns.ac-copy.com wrote:
|> There seem to be some serious memory problems with mxODBC and DbiDate.
|> unfortunately I can't include an example cause it's part of a large program,
|> but here is the code fragment:
|> 
|>          self.cursor.execute(queryst,tuple(data))
|>          self.db.commit()
|>          print self.table,str(self.addmes)
|>          self.dialog = Pmw.MessageDialog(self.parent, title = 'Add Info',
|>                        text = "Record in " + self.table + " hinzugefügt",
|>                        bitmap = 'info',
|>                        command = self.addmes,
|>                        buttons = (AddMode_c,BrowseMode))
|> 
|> This works with the printstatement uncommented, when I comment it out, I get
|> an error message from the Pmw.MessageDialog-call.
|
|What does it say ? And what are self.table and self.addmes ? It could
|be a reference count problem...
|
|> 
|> Here is the querystring:
|[...]
|> and here the data:
|> 
|> ,Data:  [31867, 'FA', '2082', '1998-03-04', 0.0, '', 0, None, 0.0, None, 0.0,
|>  None, None, 0, '', '', '', '', '', '', '', '', '', '', '', '']
|> 
|
|-- 
|Marc-Andre Lemburg
|
|

_______________
DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
_______________