Re: [Zope] Your thoughts about Zope-based database apps

2000-11-08 Thread Francisco José Esteban Risueño

We've implemented an application like this in our intranet, and it's now
up and running satisfactory with 1500 users. We use Oracle as back-end.
Here are responses from the rest of your questions:

1.- We've using zope only since six months ago. the development period
of the application was three months and we can consider him medium-sized
(30 tables, 10 imput screens, 15 output screens, interfaces with
operating system authentication and services, outputs in PDF, RTF and
HTML formats...). We're not particulary smart :).

2.- We use javascript to perform data validation before insert them in
the database (although Oracle has its own data validation, we also
perform it in the client side in order to reduce database traffic and to
offer the user more precise information about the errors)

3.- The implementation of master/detail forms is rather complicated the
first time, but possible: We offer initialy three detail rows for the
master one and an "Add row" button that refresh the screen with another
detail row when pressed (using zope dtml-in statements). In the
validation of the form, we know the number of detail rows and the number
of form fields of each row, so, by the position of a field in the form,
whe can know to wich detail it belongs and can pass it to the proper
insert/update sentence. If you understand spanish, I can give you an
example dtml method with this behaviour

Alonso Rhenals escribió:

 I'm considering implementing a web-based database application with
 MySQL as a back-end and a Zope-based front-end. I wonder if you could
 provide your thoughts on the following questions: 1. Is Zope a good
 tool to quicky build an efficient  effective user interface for a
 database application? 2. In particular, what would be the best way to
 implement the inserting and updating of records along with input data
 validation? (Retrieving data from a database to show on a web page
 using Zope is straightforward as you know.) 3. In several cases I'd
 like to implement a main form/subform, where the subform allows the
 user to enter several items related to only one record in the main
 form. Since every item might have many fields (say 20) I'd like to
 present just the most important fields on a table, and allow the user
 to view/enter/update all the fields for each item in a different web
 page. Those of you familiar with Microsoft Access know that in Access
 it is straightforward to implement this main form/subform interface. I
 wonder what would be the best way of implementing this using Zope? 4.
 Do you know of any existing Zope-based app similar to this?.
 Obviously, the back-end doesn't have to be MySQL. 5. Finally, if
 somebody is interested in further discussing this type of
 applications, I'll be glad to participate. Just e-mail me to
 [EMAIL PROTECTED] Thanks in advance for your inputs.
 Alonso RhenalsMiami, FL, USAPlease reply to: [EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] input type=checkbox name not pushed to zsql method namespace

2000-10-09 Thread Francisco José Esteban Risueño

this is the standard behaviour in a HTML form. To avoid this problem we
include
an line like this:

dtml-if "REQUEST.has_key('CheckBox_name')"
dtml-else
 dtml-call "REQUEST.set('CheckBox_name', 'N')"
/dtml-if

in the method that receives the form data.

Hope this help

=?iso-8859-1?Q?Beuserie_Fr=E9d=E9ric_=28stbrice_dsi=29?= escribió:

 hi,

 it seems to me that the variable name corresponding to a checkbox into a
 form is not
 pushed to the namespace of the SQL query when it's not checked. if it's
 checked, it works
 fine. the error reported is related to the argument list entry corresponding
 to the name of the checkbox into the zsql method.

 thanks a lot.

 -
 Beuserie Frederic
 DSI / Système et Exploitation - 3 Suisses Belgique

 Tel: +3269/882485 / Fax: +3269/882491
 Email: [EMAIL PROTECTED]

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] database connection problem (halting Zope)

2000-10-05 Thread Francisco José Esteban Risueño

In this document:
http://www.zope.org/Members/petrilli/DARoadmap

the behaviour of different database adapters in a multithreaded environment is
discussed. We've observered in our Zope instalation that a long query via ZODBCDA
halts (this is similar in the Czech Republic and in Spain). Howerver, if we issue
the same query via ZOracleDA, the server still responds while the quere is
executing (like a multithreaded server should do)

Hrasky Petr escribió:

 thanks again,
 yes, the python versions I use are compiled for threads, they link
 against libpthread under linux. I have also found ZmxODBCDA adapter and
 it does not work for me yet - it shows in Zope as broken product.
 I also spoke to local Oracle hotline and they said that ODBC access is
 not thread safe until 8.1.6.1.1 due to some error in OCI libs. Now I am
 downloading Oracle for Linux and Sybase for Linux and I will try to
 compile OracleDA and SybaseDA.

 Thanks a lot all.

 Regards,

 Petr

 -Original Message-
 From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 03, 2000 11:17 PM
 To: Hrasky Petr
 Cc: '[EMAIL PROTECTED]'
 Subject: RE: [Zope] database connection problem (halting Zope)

 Hrasky Petr writes:
   thank you for answers. To clarify:
   I run Zope-2.2.2/Linux2.2.14/MySQL-ZMySQLDA1.1.3nonbin at home and
   Zope-2.2.2-binary/NT4.0Workstation/ZODBCDA3.1.0b2 (Oracle 8i ODBC,
   Sybase11.5)at work. Oracle connection at work and MySQL (at home just
   for testing) run looong queries and halt Zope. I have no such queries
   for Sybase yet.
I will try to recompile python for linux, but I can't do so for
 WinNT
   as I have no compiler. Anyway I thought the python distributed with
   binary release of Zope is threaded, no?
 If Python is compiled without threads, there is no module
 "thread". Zope relies on this module. It dies immediately,
 if it is not there. Thus, you can be sure, your
 Python has thread support compiled in.

   So, does anybody know of either binary and threaded Zope driver for
   Oracle , Sybase etc. or the same ODBC driver? And what is the state
 of
   python threading on WinNT paltform?
 The Python that comes with Zope has thread support compiled in.

 Maybe, your Python-ODBC connection "forgets" to release
 Python's interpreter lock.

 We, once, had such a problem.
Accidentally, the DCOracle module had been set up with a standard
Python distribution (with threading disabled) rather
than the Zope Python. As a consequence, the
DCOracle did not call "releaseLock" and
"acquireLock" (as they would not be present
in a non-threaded Python).
And, of course, database operations blocked Zope.

 Dieter

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] DCOracle 1.3.2 for Windows NT

2000-10-04 Thread Francisco José Esteban Risueño

I'm not tried it yet, but you can get an VC6 Workspace for DCOracle in
this page:

http://starship.python.net/crew/arpadk/

Marcin Dzienniak escribió:

 Hello,
 I 'm looking for oci driver (DCOracle 1.3.2) to Windows NT platform,
 I have heard that someone in this community buit DCOracle for NT and I
 wonder if you can help me.
 I would be gratefull if you could send me a makefile to this
 platform or a comliled file (*.pyd).
 I have Oracle 8i 8.1.6 .

 Please send me some information for my adress [EMAIL PROTECTED]

 Thank you for your attention.

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] oracle8 and cursors

2000-07-05 Thread Francisco José Esteban Risueño

I can't imagine a problem that can be solved by cursors and not by a query.

We have been used PL/SQL (the extension of SQL by Oracle) inside zsql methods
like this:

DECLARE
  C_AUX NUMBER;

BEGIN

INSERT INTO IT_GRUPO_INVESTIGACION (
  C_GRUPO, D_GRUPO, S_GRUPO, F_INI_VIG, F_FIN_VIG, C_MACROAREA, L_TIPO_GRUPO,
C_PAI, C_CLASIFICACION_PAI
) VALUES (
 dtml-sqlvar C_GRUPO type=nb,
 dtml-sqlvar D_GRUPO type=nb,
 dtml-sqlvar S_GRUPO type=nb,
 dtml-sqlvar F_INI_VIG type=nb,
 dtml-sqlvar F_FIN_VIG type=nb optional,
 dtml-sqlvar C_MACROAREA type=nb,
 dtml-sqlvar L_TIPO_GRUPO type=nb,
 dtml-sqlvar C_PAI type=nb optional,
 dtml-sqlvar C_CLASIFICACION_PAI type=nb optional
);


dtml-if items
dtml-in items

dtml-if "C_AREA_UNESCO  ''"

INSERT INTO IT_GRUPO_AREA_UNESCO (
C_AREA_UNESCO, C_GRUPO, F_INI_VIG, F_FIN_VIG
) VALUES (
 dtml-sqlvar C_AREA_UNESCO type=nb,
 dtml-sqlvar C_GRUPO type=nb,
 dtml-sqlvar F_INI_VIG type=nb,
 dtml-sqlvar F_FIN_VIG type=nb optional
);

/dtml-if
/dtml-in
/dtml-if

dtml-if items2
dtml-in items2

dtml-if "D_GRUPO_TECNICA  ''"

SELECT NVL(MAX(C_GRUPO_TECNICA)+1,1)
  INTO C_AUX
  FROM IT_GRUPO_TECNICA;

INSERT INTO IT_GRUPO_TECNICA (
C_GRUPO_TECNICA, D_GRUPO_TECNICA, C_GRUPO, L_PROPIA
) VALUES (
 C_AUX,
 dtml-sqlvar D_GRUPO_TECNICA type=nb,
 dtml-sqlvar C_GRUPO type=nb,
 dtml-sqlvar L_PROPIA type=nb optional
);

/dtml-if

/dtml-in
/dtml-if


EXCEPTION
 WHEN OTHERS THEN
   rollback;
   raise;
END;

and it works fine. However, in such ZSQL method there isn't a resultset to
obtain (it contains  INSERT and UPDATES). I think you can get a resultset by
inserting the results of your cursor proccesing into a temp table and finishing
your PL/SQL with a query.

On the other hand, a cursor is a select statement you define in order to
process each row individually; that is, a ZSQL method. You can reproduce the
cursor proccessing by defining several ZSQL methods with single SELECT and
combining then in a DTML method that does the actual proccessing (whith
dtml-in, dtml-let...)

Andy Pahne escribió:

 hi, there,

 i've been using oracle8 with zope succesfully for a while. now my database
 programmer came up with a solution for a certain problem, which "we cannot
 solve with an easy select statement". he told me, that we are gonna have to
 use db-cursors instead.

 i must admit that i have heard the therm cursor before, but i am not sure
 how to use them with zsql-methods.

 my question is fairly simple: is there any difference in handling cursors
 with zsql-methods in comparison to handling 'simple' select-statements? can
 i use dtml-in "..."/dtml-in to iterate over the result sets?

 I read DCOracle.txt which comes along with DCOracle-Product, but I do not
 understand it very well.

 Any recommended readings?

 Andy Pahne
 ap@net22

 net22 GmbH
 Bad Meinberger Strasse 1
 32760 Detmold
 Tel.: 05231 - 580 640

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] zodbc performance question

2000-06-09 Thread Francisco José Esteban Risueño

I think Zope creates itself a pool of connections to the database,
extending it
when he need more performance. In our installation, we see initially
seven
connection to Oracle (trough ODBC) generated by only one zodbc database
conection
object

Tino Wildenhain escribió:

 Hi Julio,

 we tested exactly this approach but run into some deadlock-situations.
 Since it did not improve performance we now use only one
 connection-object
 per database.

 Regards
 Tino Wildenhain

 julio dinis wrote:
 
  Hi all,
 
  Using zodbc, supose we have the following situation. One
  zodbc_database_connection and lots of zsql methods. Can we say that creating
  more zodbc_database_connection(with a system dsn for each one, but all
  pointing to the same database) and thus distribute the zsql methods avoiding
  to all use the same zodbc_connection, will increase performance. Dont tell
  me I have to test it, I will but some thougts here will help.
 
  Best regards,
  Júlio Dinis Silva
  
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  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 )

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )

___
Zope maillist  -  [EMAIL PROTECTED]
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 )