Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to allow only Alphanumeric for varchar?

Re: How to allow only Alphanumeric for varchar?

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: 2000/06/14
Message-ID: <3947D6B1.BD5B3435@euclidsys.com>#1/1

You have several choices. Basically you are trying to implement some 'business rules' that apply to the data. Generally speaking, these rules can be implemented at one of three layers in your system: The lowest layer - the database: you can use triggers to catch pre-committed data and modify it, The middle layer (you dont mention one so i assume you dont have one like tuxedo or something similar where you can implement logic prior to insert/update, or the highest layer - the user interface: in your case Forms, where you implement the logic in the application itself.

From the developers perspective, it would be ideal to have the business rules seperate from the schema (ErWin output) so that they could be implemented according to the best design choices made by the development team. (of course each business rule should formally be tracked and verified before the system is put into production no matter where it has been implemented)

This should be the decision of the project technical manager - and the developers should know how to proceed with the implementation.

hope that helped...
randy

Amanda Zaborowski wrote:

> I have a question that sould be an easy one, yet I cannot find it anywhere.
> Here is my situation:
>
> * What I would like to do is make some of the fields constrained to allow
> only alphanumeric characters. (ie - first name - we do not want user to be
> able to enter 12345 rather than a name in the 'first name' field.)
>
> 1. We are using ERwin datamodeling tool. I will then forward engineer this
> to auto create the DB in Oracle. In ERwin, you can specify that a number
> can only be valid in range of, for example, 1 to 50. I assume you can do
> this for varchars, allowing only alphanumeric chars, no numbers, etc?
>
> 2. We are using Developer 2000 Forms for front end. Is there some kind of
> formatting I can do so that user can only enter in alphanumeric chars?
>
> 3. Obviously, we have an Oracle DB - is there code I could use in creating
> the table that constrains the chars to alphanumeric?
>
> Can anyone help if this is possible in ERwin, Oracle itself, or Developer
> Forms?
>
> Thanks in advance!
Received on Wed Jun 14 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US