[Zope] Zope and Sybase Stored Procedures
Ralph Heinkel
heinkel@cenix-bioscience.com
Mon, 6 Nov 2000 14:20:50 +0100
Hi,
we are using Zope 2.1.6 with Sybase 11.9.2 on Suse Linux, and calling
stored procedures just works fine.
e.g.
create procedure csp_add_barcode
@tableName varchar(12), @barcode numeric(8) OUT
AS
insert into BarcodeItem (tableName) values (@tableName)
select @barcode = @@identity
This is a stored procedure that inserts one row into the table 'BarcodeItem'
and returns an automatically created unique identity key as a result named
'barcode'.
The ZSQL methods takes one parameter 'tableName' and returns the resulting
'barcode' like a normal select statement does.
The query template simply is:
csp_add_barcode <dtml-sqlvar tableName type=string>
Hope that helps. Btw, Zope 2.2.0 has a bug in connecting to SybaseDA which
is reported to digicool. Should be fixed in the next release. If interested
for the fix, send me a mail.
Ralph
------------------------------------------------------------------
Ralph Heinkel Cenix Bioscience GmbH
Director of the IT-Unit Tel : +49 6221/387 915
Meyerhofstr. 1 Fax : +49 6221/387 971
69117 Heidelberg, Germany eMail: heinkel@cenix-bioscience.com