Title: Oracle type validation module

I am working on an application that collects a bunch of cgi input into text files and later batch dumps the data from files into an Oracle db. I would like to make sure that the cgi input conforms to the db data types before I write it to the text files. The idea is to alert cgi users to data type problems when they first submit the data (as opposed to waiting for Oracle to return an error during the batch job).

Does anyone know of a module that can validate a scalar value against an Oracle data type, e.g.

<snippet>
use CGI;
use ValidateOracleDataTypes qw( ora_validate ); #???

my $q = new CGI;

if ( ora_validate( $q->param('field1'), NUMBER(7,2) ) )
{
        #value is ok
}
else
{
        #value is not ok
}

if ( ora_validate( $q->param('field2'), DATE )
{
        #value is ok
}
else
{
        #value is not ok
}

</snippet>

Thanks,

Peter
                                **************************************************************************          The information transmitted herewith is sensitive information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Reply via email to