strange coldfusion errors after ms sql server table change -
i working coldfusion 9 on windows server, using ms sql server 2005. encountering strange issue.
i creating object querying table in database, getting necessary info, , building object results. if table has these columns:
id name address
i creating object methods such get_id(), get_name(), get_address(), etc. works fine , when query methods results expect.
but go in , change table. add new column, such "city". ok, object still instantiates. go in , put data new column. object instantiation no longer functions. getting generic errors this:
element address undefined in instance
i notice still have cftry tags wrapped around cfquery statement, take off. see error:
unsupported data conversion
so go database , delete new column completely. works correctly, before. seems when add new column table, sql server trying sort of data conversion on it? don't see have flagged happen anywhere.
any can given appreciated!
check make sure query isn't using select * columns. sql server can cache execution plans , not return columns have been added if you're using select *.
another way fix add line break, or else, query sql server create new execution plan.
either way, stay away select *, it's less performant, , can lead issues this.
Comments
Post a Comment