Search This Blog

Wednesday, September 19, 2007

MSSQL, - 2005 - search in the code of Store procedure,function, views and triggers

We had an sql function that we didn't know if is used for anywhere, so we decided to remove it. There was no reference to the store procedure in our code so the only place remaining was the sql store procedures, functions and triggers and views

To do this we use the sql query


select *
from sys.objects
where type_desc in ('SQL_SCALAR_FUNCTION','VIEW','SQL_STORED_PROCEDURE',
'SQL_SCALAR_FUNCTION','SQL_TRIGGER')
and OBJECT_DEFINITION (object_id) like '%MinPricePreCovered%'

Monday, September 17, 2007

Query Of Queries is case sensitive

I discover recently that Query of queries is case sensitive. to solve the problem i use the function Lcase to convert the coldfusion variables to low case and the query function Lower to convert the query column to low case.


select *
from qQ2
where
lower(column_1) = '#LCase(cF1)#'

Friday, September 14, 2007

ColdFusion 8 Bug - CronService fails with: whith listAll schedule task

This is an error i found on CF 8 using the coldfusion.server.ServiceFactory

When you use the createObject("JAVA","coldfusion.server.ServiceFactory").getCronService().listAll() to get the list of schedule task on the server it doesn't return any newly added schedule tasks that were added with the cfschedule command (it return [undefined array element]) - however this is not the case when you add the schedule task directly in the server.

The solution is to use the load() method before retrieving the list of all schedule task