Hi,
I am working with zope and I want to securize my access to the data stored in a Sybase Server. So I am trying to do all my SQL requests by using stored procédures. The only thing that goes wrong is that I don't know how to make a call to a Sybase Stored Procedure within Zope.
Can anyone help me ?
Sincerly,
Badara POUYE Infosources 16, rue Hoche Tour Kupka B 92906 Paris La Défense Tel.: (+33)141028000
Everything works from a SQL method except "exec sp_xxxxxx" calls. It is driving me insane. ZSybaseDA spits errors about some operation in progress .
Quoting b.pouye@paris.infonie.fr:
Hi,
I am working with zope and I want to securize my access to the data stored in a Sybase Server. So I am trying to do all my SQL requests by using stored procédures. The only thing that goes wrong is that I don't know how to make a call to a Sybase Stored Procedure within Zope.
Can anyone help me ?
Sincerly,
Badara POUYE Infosources 16, rue Hoche Tour Kupka B 92906 Paris La Défense Tel.: (+33)141028000
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 )
---------------------------------------------------------- Universidad Federico Santa Maria - Campus Guayaquil Enviado por: www.usm.edu.ec
MANUEL JOSE AMADOR BRIZ wrote:
Everything works from a SQL method except "exec sp_xxxxxx" calls. It is driving me insane. ZSybaseDA spits errors about some operation in progress .
WARNING: This data is a bit old! Last I knew, SybaseDA didn't work with stored procedures. if that ahs changed, I apologize. I haven't seen anything that says it changed though.
-- E PLURIBUS LINUX
I have this rather curious problem with Zope 2.1.3 on WinNT.
I have a zsql query which returns a number of records. I want to do an update on the same table that is being queried for each record returned, but get an authentication challenge that I can not pass.
If instead I do, eg, an insert into another table with each value returned, it works fine. Is there something special about sql updates?
-- Graham Chiu
Graham Chiu wrote:
I have this rather curious problem with Zope 2.1.3 on WinNT.
I have a zsql query which returns a number of records. I want to do an update on the same table that is being queried for each record returned, but get an authentication challenge that I can not pass.
If instead I do, eg, an insert into another table with each value returned, it works fine. Is there something special about sql updates?
There shouldn't be, are you using DTML in both methods? If so, I suspect one of the methods is using DTML which requires higher authentication privledges.
-Michel
On Sat, 04 Nov 2000 13:05:08 -0800 Michel Pelletier michel@digicool.com wrote:
There shouldn't be, are you using DTML in both methods?
Yes. It's the same method, I just change the inner zsql statement. The one with the update fails, the one with the insert is okay.
If so, I suspect one of the methods is using DTML which requires higher authentication privledges.
But I'm the superuser. When it fails the authentication, it says I don't have rights to access standard_html_header
-- Graham Chiu
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