[Zope] Calling ZSQL from DTML

Joe Block jpb@ApesSeekingKnowledge.net
Wed, 3 Jul 2002 19:37:10 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm finally getting back to a project that got sidetracked, and I'm 
running into a problem.  I'm working with several tables in PostgreSQL, 
and need to generate a unique ID so I can insert some data into several 
tables and connect them by keyids.

Thanks to advice I got here several months back, I'm using a sequence in 
PostgreSQL and retrieving the value of the sequence with a ZSQL method.

Here's the source of the uniqueid method:
SELECT nextval('uniqid_seq')

My problem is, I want to take the results of the uniqueid ZSQL method 
and use it to fill in a hidden value in the newjob_form dtml method, so 
when it calls the spawnjob ZSQL method, it can fill in the jobid 
correctly in the inserts.  spawnjob works just fine when I test it 
(inserts successfully to both tables) but I can't figure out how to get 
at the results of uniqueid.

I'm sure I'm missing something obvious, but I'm not making any progress.

Thanks,

jpb
- --
Joe Block <jpb@ApesSeekingKnowledge.net>

think about it. would you work for a company that couldn't tell the 
difference in quality of its employees' normal work product and the work 
product of someone on drugs without performing a test?
  -socks (agent01413@my-deja.com)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9I4qryEXo8W2M9hsRAoixAKCZn829H2pz2we22l4vNnCWjTwxZQCdEAQz
zn35gbOw6JnY+Hp2sKEDGkY=
=75A7
-----END PGP SIGNATURE-----