[Zope] Pointer to ZSQL Method using the UPDATE call

McDonnell, Larry lmcdonnell@protonenergy.com
Fri, 2 Aug 2002 07:34:26 -0400


Hi,

Thanks to all for their solutions, I'm up and running.

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ed
Leafe
Sent: Thursday, August 01, 2002 4:37 PM
To: McDonnell, Larry
Cc: zope@zope.org
Subject: Re: [Zope] Pointer to ZSQL Method using the UPDATE call


On Thursday, August 1, 2002, at 03:27  PM, McDonnell, Larry wrote:

> I have been poking around to try to find the proper syntax to do an 
> UPDATE
> within and ZSQL Method. I will need to update several fields within the
> call. I tried using the following:
>
> update  field_service_log
>  set  <dtmlsql-var caller_name type="string">
> where <dtml-var service_log_num = service_log_num>
>
> It will save but produce an error. TIA

	You might want to check out the patch to SQLgroup made by Andy 
Dustman. I posted a similar question a couple of weeks ago, and got this 
reply: http://groups.yahoo.com/group/zope/message/94058.

	I've installed the two patch files (but not SQLBlender itself), and 
it's working flawlessly. I now have ZSQL methods for updating that look 
like:

update reg
<dtml-sqlgroup set noparens>
	<dtml-sqltest iplayerid type="int" op="eq">
<dtml-comma>
	<dtml-sqltest ilastteamid type="int" op="eq" optional>
<dtml-comma>
	<dtml-sqltest clastteamtype type="string" op="eq" optional>
<dtml-comma>
	<dtml-sqltest cotherdesc type="string" op="eq" optional>
<dtml-comma>
	<dtml-sqltest itryoutage type="int" op="eq">
<dtml-comma>
	<dtml-sqltest cpostip type="string" op="eq">
</dtml-sqlgroup>
where iid = <dtml-sqlvar iid type="int">


      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://foxcentral.net


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )