[Zope-DB] updating fields in a zsql method programmatically

2007-08-27 Thread onsombal
Here's the scenario: 1. "insertNew" is a Z SQL Method for creating a new record in pgsql "table1" Argument list = field1, field2, field3 SQL Query: INSERT INTO table1 (field1, field2, field3) VALUES ( , , ) 2. "call_insertNew" is a python script that is called as an "After Validati

Re: [Zope-DB] updating fields in a zsql method programmatically

2007-08-27 Thread onsombal
I tried the techniques you suggested and it results in the same error --> "KeyError: 'form.submitted'" field1 = changed_field1 context.insertNew(field1=field1) --> I also tried the other technique and got the same error. I tried your technique with the following changes to my pfg (ploneformgen)

Re: [Zope-DB] updating fields in a zsql method programmatically

2007-08-27 Thread onsombal
_renameObjects(ids=["std-survey"], new_ids=[survey_id]) survey_obj.setTitle(survey_title) survey_obj.reindexObject() fbkurl = survey_obj.absolute_url() formresult['fbkurl'] = fbkurl #create record in usdb listing table context.listingsCreateRow() And it works! Charlie Cla

[Zope-DB] passing multiple variables via the url string

2007-09-01 Thread onsombal
I'm attempting to pass multiple variables via the url string. field1 & field2 are form variables to be passed on a redirect. field1 = 'foo' field2 = 'bar' For the command below, I do not get a python syntax error unless I remove the "+" symbols: return container.absolute_url()+'

[Zope-DB] case insensitive ZSQL queries

2007-09-05 Thread onsombal
is there an easy way to make the following ZSQL query case-insensitive? select * from clients Thanks... Jim -- View this message in context: http://www.nabble.com/case-insensitive-ZSQL-queries-tf4388729.html#a12512815 Sent from the Zope - DB mailing list archive at N

Re: [Zope-DB] case insensitive ZSQL queries

2007-09-06 Thread onsombal
thanks -- it now works like a charm Garry Saddington wrote: > > > > On Wed, 2007-09-05 at 16:16 -0700, onsombal wrote: >> is there an easy way to make the following ZSQL query case-insensitive? >> >> select * from clients >> >> >&