9.0.2 cfc processing sql wrong?
Ok, this is a new one on me. I had 9.0.1 and everything worked just fine. Well today 9.0.1 died so I uninstalled and installed 9.0.2. That all went fine. Most of my pages call a counter.cfc to keep track of hitcounts on pages.
Here is the cfc:
<CFCOMPONENT HINT="Hitcount processing">
<!--- List users method --->
<cfset day=LSDateFormat(Now(), "mm/dd/yyyy")>
<cfset time=LSTimeFormat(Now(), "h:mm:ss tt")>
<cfset current="#day#">
<CFFUNCTION NAME="Add"
RETURNTYPE="void"
HINT="Add to hitcount datebase">
<CFARGUMENT NAME="Page"
TYPE="string"
REQUIRED="true"
HINT="Page/App name required">
<!--- Get users --->
<CFQUERY NAME="HC_Add" DATASOURCE="hitcountSQL">
INSERT INTO hitcount (Page, Date)
VALUES ('#arguments.page#', '#current#')
</CFQUERY>
</CFFUNCTION>
</CFCOMPONENT>
The really messed up this is now I get errors everytime this cfc is called.
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Column name or number of supplied values does not match table definition.
The error occurred in D:/cfscripts/CFCs/counter.cfc: line 16
Called from D:/cfscripts/Test/show.cfm: line 17
Called from D:/cfscripts/CFCs/counter.cfc: line 16
Called from D:/cfscripts/Test/show.cfm: line 17
14 : <CFQUERY NAME="HC_Add" DATASOURCE="hitcountSQL">
15: INSERT INTO hitcount
16: VALUES ('#arguments.page#')
17: </CFQUERY>
18: </CFFUNCTION>
For some reason the cfc is ignoring the column name and second value in the query. Any clue what in the world causes this?
