Question
Stange Cfquery NULL Error:
I was working on the project when i came to a sudden problem,
Where i was running into an error.
The error was sometimes appearing and sometimes not so i just tries to use th IsNull UDF from cflib library but still error persists:
here is the error: i recieve:
The system has attempted to use an undefined value, which usually
indicates a programming error, either in your code or some system
code.
Null Pointers are another name for undefined values.
and this was my query that where i used iSnull and Still getting the error:
<cfquery name="qGetArticleInfo" datasource="#Request.ConsultantTrackSiteDSN#">
SELECT SiteSections_LOOKUP.SiteSectionName, SiteSections_LOOKUP.SiteSection_ID, Articles.ImageFileName, Articles.Content, Articles.CallOut, Articles.Teaser, Articles.Title, Articles.dtStartDate, Articles.SubTitle, Articles.Article_ID, Articles.lColumnLengths, Articles.iCalloutWidth, Articles.ImageHeight, Articles.ImageWidth, Articles.bPDFArticle, Articles.PDFFileName, Articles.SmallImageFileName, Articles.SmallImageWidth, Articles.SmallImageHeight, Articles.SmallImageOriginalFileName
FROM SiteSections_LOOKUP INNER JOIN Articles ON SiteSections_LOOKUP.SiteSection_ID = Articles.SiteSection_ID
WHERE Articles.bDeleted = 0
<cfif IsNull(IsDefined("Attributes.Article_ID"))>
AND Articles.Article_ID = #Attributes.Article_ID#
<cfelseif IsNull(IsDefined("Attributes.SiteSection_ID"))>
AND Articles.bActive <> 0 AND Articles.SiteSection_ID = #Attributes.SiteSection_ID# AND Articles.dtStartDate <= #CreateODBCDate(Now())#
</cfif>
ORDER BY Articles.dtStartDate DESC, Articles.Title
</cfquery>
i tried a lot but in vain can anybody help in this instance..
The error was sometimes appearing and sometimes not so i just tries to use th IsNull UDF from cflib library but still error persists:
here is the error: i recieve:
The system has attempted to use an undefined value, which usually
indicates a programming error, either in your code or some system
code.
Null Pointers are another name for undefined values.
and this was my query that where i used iSnull and Still getting the error:
<cfquery name="qGetArticleInfo" datasource="#Request.ConsultantTrackSiteDSN#">
SELECT SiteSections_LOOKUP.SiteSectionName, SiteSections_LOOKUP.SiteSection_ID, Articles.ImageFileName, Articles.Content, Articles.CallOut, Articles.Teaser, Articles.Title, Articles.dtStartDate, Articles.SubTitle, Articles.Article_ID, Articles.lColumnLengths, Articles.iCalloutWidth, Articles.ImageHeight, Articles.ImageWidth, Articles.bPDFArticle, Articles.PDFFileName, Articles.SmallImageFileName, Articles.SmallImageWidth, Articles.SmallImageHeight, Articles.SmallImageOriginalFileName
FROM SiteSections_LOOKUP INNER JOIN Articles ON SiteSections_LOOKUP.SiteSection_ID = Articles.SiteSection_ID
WHERE Articles.bDeleted = 0
<cfif IsNull(IsDefined("Attributes.Article_ID"))>
AND Articles.Article_ID = #Attributes.Article_ID#
<cfelseif IsNull(IsDefined("Attributes.SiteSection_ID"))>
AND Articles.bActive <> 0 AND Articles.SiteSection_ID = #Attributes.SiteSection_ID# AND Articles.dtStartDate <= #CreateODBCDate(Now())#
</cfif>
ORDER BY Articles.dtStartDate DESC, Articles.Title
</cfquery>
i tried a lot but in vain can anybody help in this instance..
