I'm essentially creating a glorified import process to join data from two of our systems and I'm seeing some strange things from CF/SQL Server 2000. It's fairly simple - I'm looping over one query and inserting data into a second database, calling private functions within the same CFC to retrieve some of the values.
Here is the code that results in "invalid object" database error: <cfoutput query="q"> <cfquery name="qq" datasource="mas500_orders"> INSERT INTO tecSOLine(ItemKey) VALUES(<cfqueryparam value="#getItemKey(sku)#" cfsqltype="cf_sql_integer">) </cfquery> </cfoutput> I get the same error when I try #getItemKey(sku)# without the cfqueryparam. The following code, wherein I retrieve the key ahead of the insert query and then use cfqueryparam, does NOT produce the error. <cfoutput query="q"> <cfset myKey=getItemKey(sku)> <cfquery name="qq" datasource="mas500_orders"> INSERT INTO tecSOLine(ItemKey) VALUES(<cfqueryparam value="#myKey#" cfsqltype="cf_sql_integer">) </cfquery> </cfoutput> I'm stumped. Any clues? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238338 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54