New in this version:

Null Handler
Added null attribute handler code for cfqueryparam/cfprocparam in code generator. When off, these tags will always contain a null="false" attribute; when on, the null attribute will be injected with appropriate code in order to avoid errors thrown by the db.

For example, if you pass a queryparam or procparam an empty string, you should be setting null="true" since SQLServer will error upon inserting an empty string. Using the ‘null handler’ option will generate code appropriate to the datatype of the column, as in:

<cfprocparam type="IN" cfsqltype="CF_SQL_VARCHAR" dbvarname="@aoSubject" value="#args.aoSubject#" null="#iif(len(args.aoSubject),false,true)#">


<cfprocparam type="IN" cfsqltype="CF_SQL_INTEGER" dbvarname="@aoDuration" value="#args.aoDuration#" null="#iif(isNumeric(args.aoDuration),false,true)#">

and so on.

The option is available for both cfqueryparam and cfprocparam.

Rudimentary Proc Filtering
Added filtering of non-user procedures in nav tree for SQL2005.

SQL2005 handles the ‘user-ness’ of procedures differently than 2000. As such, and given how DBX enumerates user procedures in the left-hand nav tree, SQL2005 will also return non-user procs, such as those that begin with ‘dt_’. I haven’t found a strictly metadata-based (automatic) solution for this and I found it irritating enough to add some simple string matching to filter out ‘dt_’ procs. Other procs that are not user owned (e.g., sp_ procs related to diagramming in SSMS) will still show up but they are few and less objectionable than all the other crap that was showing up.

I’ll rework the routine to rely solely on the metadata at some point, but for now this is my, ahem, ‘solution’.