So, I did some more digging on google and I found the following:

select column_name, data_type, data_length, data_precision, data_scale
from ALL_TAB_COLUMNS
where table_name = 'USERS' and column_name = 'USER_ID'


And with CFDUMP, it returned something like this (kinda wrapped):


        COLUMN_NAME     DATA_LENGTH     DATA_PRECISION  DATA_SCALE      
DATA_TYPE
1       USER_ID         22      10      0       NUMBER

that's pretty good!  I think I'll see what I can do with this.  If 
someone does have code to manipulate this in some kinda form validation, 
that would be handy.  Otherwise, I figure that I'll just match my form 
field names to the database names (i.e. ffUSER_ID), strip off the "ff" 
and then pull the column specs out of the database and do the validation.

Ultimately, I'd like to make a custom tag that handles this as I hate 
building in form validation.

Thanks,
Mike

Mike Soultanian wrote:
> I was wondering if there is a way to pull column information from oracle 
> to help with form validation.  It would be really nice if I could set up 
> my database and then have coldfusion read the setup of my tables and 
> perform its form validation based on that.
> 
> I did some research on this and it seems like SQL server supports a 
> standard format using INFORMATION_SCHEMA to return the column types and 
> sizes and what not.  Is there some way to pull similar information from 
> oracle so I can use that for form validation purposes?
> 
> Thanks,
> Mike
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218255
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to