I tested both DBCC DBCC FREEPROCCACHE and  DBCC DROPCLEANBUFFERS as well and
it does not solve the cached schema problem.

Here's my approach:

I created a table called "tmpTable" with the columns username, and email
address, date added and a tmp_id (int).  I then ran the following query
successfully.


<cfquery name="test" datasource="test">
select *  
from tmpTable 
Where username = <cfqueryparam cfsqltype="CF_SQL_CHAR" value="bill"/>
</cfquery>


Then I added a column "fname" between the tmp_id and the username. I reran
the query and generated the error "value cannot be converted to requested
type". 

Then I opened query analyzer and tried the 2 DBCC routines. The query
continued to throw the error until I added a space or something to it. So
whatever is going on JDBC is not "re-requesting" the table schema and MS SQL
is not flagging the table as changed in a way that JDBC can recognize. This
does not seem to affect the same query run in query analyzer. So... Does
anyone have any input into this test or can anyone think of a better one?

This is a long standing problem that I have blogged about before. The
solution of altering queries is a real hack IMO.  I really wish I had a
better one.

-Mark

Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296785
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to