[Zope] Storing a ZopeTime() within an MS Access DB

McDonnell, Larry lmcdonnell@protonenergy.com
Mon, 30 Sep 2002 13:20:39 -0400


Hi,

I am running into a wall when it comes to populating the variable arch_date
with ZopeTime. I have a web form that I need to generate an audit trail.
Before I write the updated record, I dtml-in the active table and write the
"old" information in an archive table. I added a date field (arch_date) to
the archive table but I do not know how to save the variable in my ZSQL
Method.

First I setup the variable:

<input type="hidden" name="arch_date">
<dtml-call expr="REQUEST.set('arch_date', ZopeTime())">
<dtml-var arch_date>
  
Next, I write the records:

<dtml-in capa_report_no_search>
<dtml-call create_arch_capa_record>
</dtml-in>

<dtml-if expr="evaluator==''">
<p>The form requires the "Evaluator" field must be filled in for the record
to be saved. 
Use the Back Arrow on your Web Browser <img src="/intranet/back_arrow"> to
enter the information.</p>
<dtml-else>
<dtml-call "REQUEST.SESSION.set('originator', originator)">
<dtml-call "REQUEST.SESSION.set('evaluator', evaluator)">

<dtml-call expr="update_capa_record(REQUEST)">

My SQL looks like this:

<dtml-if arch_date><dtml-if "arch_date==''">NULL<dtml-else>
 <dtml-sqlvar arch_date type=nb></dtml-if><dtml-else>NULL</dtml-if>)

I have tried type=string but I see no errors and the table is left blank.
Any help would be appreciated, thanks.



Larry McDonnell

Proton Energy Systems
50 Inwood Rd.
Rocky Hill, CT 06067
(860) 571-6533 ext. 531
Email:lmcdonnell@protonenergy.com
www.protonenergy.com