Re: [Zope] Zope, database field formats, output format of queries

2001-01-23 Thread Dieter Maurer

Michael Schmidt writes:
 > On Mon, Jan 22, 2001 at 07:50:45PM +0100, Dieter Maurer wrote:
 > > What do you mean with a Zope based database?
 > > 
 > > If you mean an external database, look for the datatypes and
 > > restrictions, they support for column values. SQL 3 may
 > > give you some of what you want.
 > 
 > The wording of "Zope based database" may cause a misunderstanding, 
 > what I really meant was a database behind Zope or a database 
 > accessed through the interface of Zope.
That is what I have called an external database.
You may look what constraints the database allows to define
for field values.

 > > Whether internal or external, you can control what goes through
 > > Zope to your database. You will probably need External Methods to
 > > get the full Python power, see "python.org" for documentation
 > > about Pythons vast library.
 > > You will be especially interested in the "re" module.
 > > It implements (Perl style) regular expressions.
 > 
 > Do these also achieve error handling?
No.
They allow you to check whether the conditions are met.
You are free to decide what you do in this case.
The easiest thing is to raise an exception.
This results in a preconfigured error response, which
probably is not too useful.

You may look for a recent message to this list about
DTML contracts. It may give you most of what you want.


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 )




Re: [Zope] Zope, database field formats, output format of queries

2001-01-23 Thread Michael Schmidt

On Mon, Jan 22, 2001 at 07:50:45PM +0100, Dieter Maurer wrote:
> Michael Schmidt writes:
>  > Can you create fields in a zope based database where you force 
>  > the fields to accept e.g. only letters "M" or "W" or any other 
>  > other combination of your choice?
> What do you mean with a Zope based database?
> 
> If you mean an external database, look for the datatypes and
> restrictions, they support for column values. SQL 3 may
> give you some of what you want.

The wording of "Zope based database" may cause a misunderstanding, 
what I really meant was a database behind Zope or a database 
accessed through the interface of Zope.

> Whether internal or external, you can control what goes through
> Zope to your database. You will probably need External Methods to
> get the full Python power, see "python.org" for documentation
> about Pythons vast library.
> You will be especially interested in the "re" module.
> It implements (Perl style) regular expressions.

Do these also achieve error handling?
Shall say which part of the software presents error messages 
on the screen if e.g. the user inputs other values than "M" 
and "W" in the above question?

Please excuse my ignorance, I'm new to Zope. Why I'm asking is 
that I'm thinking of recoding an application which I wrote years 
ago in the 4GL ZIM of Zanthe Information Technologies. That ZIM 
provided you with features I mentioned in the beginning and you 
hadn't to handle the error handling of wrong/unwanted input 
yourself, the underlying software did it for you.

Would be fine if Zope could do the same or similar, can it?

-- 
Michael  Schmidt [EMAIL PROTECTED]
MIRROR OF
Ghostscript  *  X-Windows X11  *  DJGPP  *  and more...

___
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] Zope, database field formats, output format of queries

2001-01-22 Thread Dieter Maurer

Michael Schmidt writes:
 > Can you create fields in a zope based database where you force 
 > the fields to accept e.g. only letters "M" or "W" or any other 
 > other combination of your choice?
What do you mean with a Zope based database?

If you mean an external database, look for the datatypes and
restrictions, they support for column values. SQL 3 may
give you some of what you want.

Whether internal or external, you can control what goes through
Zope to your database. You will probably need External Methods to
get the full Python power, see "python.org" for documentation
about Pythons vast library.
You will be especially interested in the "re" module.
It implements (Perl style) regular expressions.


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] Zope, database field formats, output format of queries

2001-01-22 Thread Michael Schmidt


Hi,

having searched through zope's website at the weekend and gone 
through the mailinglist archive I did not find stuff regarding 
the below in FAQs or HOWTOs. The general idea behind zope and 
the features of it are wonderful. 

I'm thinking of one application and would like to know:

Can you create fields in a zope based database where you force 
the fields to accept e.g. only letters "M" or "W" or any other 
other combination of your choice?

Can you setup database fields with a format e.g. of "9/99/9" 
where all 9s mean numeric input 0-9 and the slashs are always 
put at their fixed positions by the software when the field is 
displayed for input?

Can you setup database fields with a date format e.g. DD/MM/ 
or MM/ which *force* the user to input values in that format?

Can you output queries of databases in a format you can choose 
yourself, that the output fields may be incorporated into 
serial letters to be run by/through text-processing or office 
systems?

Would be fine to get your responses.
I appreciate your feedback. 

Have a nice day
Michael

-- 
Michael  Schmidt [EMAIL PROTECTED]
MIRROR OF
Ghostscript  *  X-Windows X11  *  DJGPP  *  and more...

___
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 )