Hey gang, I have an issue that I need a very simple answer too. I am build a set of custom tags to allow the end coder to get all of the information about a datasource that you would ever want to know and some things you wouldn't.
My issue is that some databases support certain attributes and others do not. If you are using my tag and you ask for a some feature of a database that is not supported by that DBMS it will throw a SQLException. What I would like your opinion on is what would you expect the tag to do. The solution I have come up with so far is to let you pass in a throwOnException attribute and if the feature you are asking for is not supported you can choose how the tag will respond with or with out an error. If you choose to throwOnException="false" the value you are asking for will be given back to you as it existed when the tag was initialized. My specific problem with all of this is that for any given information I am passing back to the user, it may or may not be a string. The solution I have come up with is detailed in the code snippet below. If anyone is interested in looking into the tagset I am proposing you can go to http://java.sun.com/j2se/1.4/docs/api/java/sql/DatabaseMetaData.html and look at all the information that is available through your database driver. try{ source_data_type = columns.getShort(22); }catch(SQLException e){ if(throwOnException){ throw new JspException(e.toString()); } } ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]