[opencms-dev] Different fix to "Invalid parameter binding"

eva kaniasty at yahoo.com
Thu Aug 28 17:20:02 CEST 2003


OK,

Well, I found a way to fix to the error in SQL server statement, that does 
not cause the resources to show up three times.
Can anybody tell me what problems could be caused by not referencing 
CMS_PROJECTRESOURCES is in this statement?
Why is this not referenced in the generic SQL file?

In any case, here is how - I don't have the option to use mySQL, so this is 
my only option...

I replaced the whole  statement in com\opencms\file\mssql\query.properties 
in opencms.jar with the statement from
com\opencms\file\mssql\genericSql\query.properties

So the new statement is as below, and does not have any reference to 
CMS_PROJECTRESOURCES, which is what was causing
the initial error, and was also causing the triplicate issue.

C_RESOURCES_GET_FILESINFOLDER=SELECT DISTINCT CMS_RESOURCES.RESOURCE_ID, 
CMS_RESOURCES.PARENT_ID, \
                               CMS_RESOURCES.RESOURCE_NAME, 
CMS_RESOURCES.RESOURCE_TYPE, \
                               CMS_RESOURCES.RESOURCE_FLAGS, 
CMS_RESOURCES.USER_ID, \
                               CMS_RESOURCES.GROUP_ID, \
                               CMS_RESOURCES.FILE_ID, 
CMS_RESOURCES.ACCESS_FLAGS, CMS_RESOURCES.STATE, \
                               CMS_RESOURCES.LOCKED_BY, 
CMS_RESOURCES.LAUNCHER_TYPE, \
                               CMS_RESOURCES.LAUNCHER_CLASSNAME, 
CMS_RESOURCES.DATE_CREATED, \
                               CMS_RESOURCES.DATE_LASTMODIFIED, 
CMS_RESOURCES.RESOURCE_SIZE, \
                               CMS_RESOURCES.RESOURCE_LASTMODIFIED_BY, \
                               CMS_RESOURCES.PROJECT_ID LOCKED_IN_PROJECT \
                               FROM CMS_RESOURCES \
                               WHERE CMS_RESOURCES.PARENT_ID=?  \
                               AND CMS_RESOURCES.RESOURCE_TYPE <> 0 \
                               ORDER BY CMS_RESOURCES.RESOURCE_NAME











More information about the opencms-dev mailing list