[Zope] ANN: SQLPackage v 0.1 available

Paolo Bizzarri p.bizzarri@icube.it
Fri, 20 Aug 1999 16:27:07 +0200


Hi Zopers,

version 0.1 of the SQLPackage is available. No
docs currently available, apart from this mail.

SQLPackage is available from my zope page:

http://www.zope.org:18200/Members/pibizza/SQLPackage.bbe

You have to download it, put in your import
directory in the zope dir, and then import from
the Zope interface.

For usage, you have to put all the DTML and SQL
methods high in your Zope tree. They should be
visible from where you call them.

Then, for each table you want to use (for example
orders) with SQLPackage, create a folder (for
example Orders).

In the folder properties, add the table_name (the
name of the sql table), the table_id (the name of
the unique id of the table) and the table_title
(the name of the table you want to show on the
WEB).

Then, in the folder just created, create a DTML
method called ShowRecordForm. Follow the example
given in the TableFolder contained in the
distribution. You have to use as input fields the
name of the fields of the table (in our example,
orders). 

To really use the thing, now you can do as
follows:

- to call the insert form, use
name_of_the_table_folder/InsertForm. In our
example, this means Orders/InsertForm. This will
show an insert form, with all the fields you have
put in the ShowRecordForm.

- to call the delete form, use
name_of_the_table_folder/DeleteForm?your_table_id=some_value.
In our example, this could mean
Orders/DeleteForm?order_id=17. This will show you
a request for confirming the delete of the record
n. 17 from your order table.

- to call the update form,  use
name_of_the_table_folder/UpdateForm?your_table_id=some_value.
In our example, this would mean
Orders/UpdateForm?order_id=14. This will show you
a form with all the fields you have put in the
ShowRecordForm.


Not much more to say.

The connection used is a mysql connection that use
the test db (which is standard in all the
distributions of mysql I have seen).

Try and enjoy.

Ciao

Paolo


-- 
Paolo Bizzarri - Responsabile Marketing  I3 Icube
Srl
Sede:   Via Ridolfi 15 - 56124 Pisa (PI), Italia 
E-mail: p.bizzarri@icube.it		WWW: www.icube.it	
Tel: 	(+39) 050 97 02 07		Fax: (+39) 050 31 36 588