query analyzer help has a bunch of them listed in there.... ..tony
Tony Weeg Senior Web Developer Information System Design Navtrak, Inc. Fleet Management Solutions www.navtrak.net 410.548.2337 -----Original Message----- From: Joshua Miller [mailto:josh@;joshuasmiller.com] Sent: Monday, November 11, 2002 3:16 PM To: CF-Talk Subject: RE: SQL Server Response Codes? Where can I find a list of SQL Response Codes? Any idea? Joshua Miller [EMAIL PROTECTED] -----Original Message----- From: Brook Davies [mailto:brook@;maracasmedia.com] Sent: Monday, November 11, 2002 3:04 PM To: CF-Talk Subject: Re: SQL Server Response Codes? I do something like this, based on MSSQL7.0 Response codes. There's of course many more.... <cftry> <cfquery datasource="dns" name="myQuery"> select field1,field2 from mytable </cfquery> <cfcatch> <!--- catch various SQL error and attempt to fix them an re-run the insert ---> <cfparam name="cfcatch.sqlstate" default=""> <cfswitch expression="#trim(cfcatch.sqlstate)#"> <cfcase value="22001"> <!--- data is being truncated, adjust the field size's ---> </cfcase> <cfcase value="S0002"> <!--- table does not exist ---> </cfcase> <cfcase value="S0022"> <!--- missing column ---> </cfcase> </cfswitch> </cfcatch> </cftry> At 12:32 PM 11/11/02 -0500, you wrote: >Is there any way to capture the response from SQL Server in a variable >to display to an end user? > >For example, if I allow a user to run an arbitrary SQL command against >the server using a web interface and they run a DROP TABLE on a table >that doesn't exist - instead of erroring, how can I grab the actual >response from SQL Server? Anyone have any ideas? > >Joshua Miller >[EMAIL PROTECTED] > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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

