> Does anyone know of a way to determine the datatype of a > column in a SQL database before running a cfquery? > > I have created a dynamic query and need to determine the datatype of > ColumnList fields before executing a query. If a person enters text > and the table column is an integer the page breaks and visa-versa.
SELECT Column_Name, Data_Type, Character_Maximum FROM information_schema.columns Where table_name='MyTable' and Column_name='myColumn' This works for SQL Server, which I'm presuming you have from your wording Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

