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

On 2006-11-07 08:07, Anthony E. Greene wrote:
> I want to generate unique keys for a table in a PostgreSQL DB 
[snip]

I ended up assigning a macro to the form's "before record action" event.
The macro calls a shell script that uses psql to retrieve/increment the
sequence value and output it to a file. The macro then reads the file and
puts the value into the "id" control on the form.

In order to make this work, I had to make the id control the last in the
tab order on the form, so that tabbing through the form triggers the macro
then [tab] submits the completed form.

What a kludge. I've used perl/CGI for this kind of work in the past. For
now I'll continue to do so. I only use these tools for small projects
anyway. Using perl/CGI can be a little tedious, but it's a reliable and
well-understood solution set. I'll try OOo again when the DB support is
significantly improved.

- --Tony
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Anthony E. Greene <mailto:[EMAIL PROTECTED]> 0x6C94239D

iD8DBQFFUfK1pCpg3WyUI50RAiONAKDqHD5LmGJbRRdUAguXY75ocL4+DQCgw0Ha
jFIj64LttNNuEt3vDDgK3fE=
=MaM3
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to