[Zope] ODBC: Fieldname: Datatype is of Timestamp data type default value error

jj bbox jjbbox2002@yahoo.com
Wed, 16 Oct 2002 11:52:09 -0700 (PDT)


It is possible to use optional as an option in an
insert statement.  Yes the if, then, else will work
but the database gets dirty with garbage data which
will not pertain when a user does a search.  It would
be better to just leave the field blank....

-jj

--- Charlie Reiman <creiman@kefta.com> wrote:
> optional stuff is usually used for select, not
> insert (as far as I know).
> 
> I'd just hack it with an if:
> 
> <dtml-if defaultDate>
>   <dtml-sqlvar .... >
> <dtml-else>
>   SYSDATE
> </dtml-if>
> 
> > -----Original Message-----
> > From: zope-admin@zope.org
> [mailto:zope-admin@zope.org]On Behalf Of jj
> > bbox
> > Sent: Wednesday, October 16, 2002 10:25 AM
> > To: zope@zope.org
> > Subject: [Zope] ODBC: Fieldname: Datatype is of
> Timestamp data type
> > default value error
> > 
> > 
> > Hello ZopeU,
> > 
> > Z SQL method 
> > insert into table 
> >   values(
> > ...,
> > ...,
> > <dtml-sqlvar defaultDate type=string optional>
> > ...,
> > )
> > 
> > If optional is used an error occurs due to null
> > value.  Any suggestions or solution for a defualt
> > value for defaultDate if the user does not input a
> > date???
> > 
> > Note defaultDate is of type Timestamp in an access
> db.
> > 
> > -jj
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> > http://faith.yahoo.com
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> > 
> http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com