[Zope-DB] Hello!

Philip Kilner phil@xfr.co.uk
Mon, 21 Jul 2003 16:44:42 +0100


This is a cryptographically signed message in MIME format.

--------------ms070509090803080104070900
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi Jim,

Jim Penny wrote:
>>>- How do I call the "insertBook" ZSQL method from within a ZPT?
>>>
>>>- Do I have to do anything special to map my field names to the 
>>>parameters that the ZSQl expects?
>>>
...[snip]...
> OK, suppose my_sql_method is a query having parameters foo, and bar and
> it lies in the current container.
> 
> Foo and bar can be in the request, or they can be passed as named
> parameters.  In the first case, the call would simply look like:
> 
> res=container.my_sql_method(request)
> 

res=container.insertBook(request)

...seems to be accepted, but inserts nothing.

> In the second, it would look like
> 
> res=container.my_sql_method(foo=foo_value, bar=bar_value)
> 

OK, well the 2nd looks like a better bet - more explicit!

However, I can't save even a ZPT with that syntax -

res=container.insertBook(ISBN=field_ISBN, Title=field_Title)


...gives me: -

Compilation failed
TAL.HTMLParser.HTMLParseError: junk characters in start tag: ', 
Title=field_Title)', at line 10, column 1

I actually can't se what I am doing wrong.

Since Friday I have learned about: -

<span tal:replace="structure request">info about the request 
namespace</span>

...so I know my data is there - just not why it neither inserts not 
gives me an error message!

Any clues? I'm stuck now and I can only take this level of frustration 
in 150 minute chunks so I'm going to take a break!!!

-- 

Regards,

PhilK

Email: phil@xfr.co.uk / Voicemail & Facsimile: 07092 070518

"As we enjoy great advantages from inventions of others,
we should be glad of an opportunity to serve others by
any invention of ours; and this we should do freely and
generously." - Benjamin Franklin


--------------ms070509090803080104070900
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJODCC
AvowggJjoAMCAQICAwooUTANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCWkExF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