Congratulations, you found a bug!
You should be able to do exactly what you are doing, of course. What
is happening is that DataMgr doesn't know anything about the table.
The method should handle the discovery, but it isn't doing this. I'll
have the fix in 2.5, but in the meantime here are two possible
workarounds:
1. Open up DataMgr.cfc and add the following line just after <cfscript>:
var bTable = checkTable(arguments.tablename);//Check whether table is loaded
2. Call DataMgr.loadTable("Clients") before you call the truncate method.
Note, also, that the truncate method may result in a loss of data (its
purpose is to trim the excess, after all). If you leave that off,
DataMgr will give you a more helpful error. You may have already known
this, but it seemed a good idea to bring it up since we are discussing
truncate.
Sorry for the trouble, let me know how you get on from here.
Thanks,
Steve
Congratulations, you found a bug!
Note, also, that the truncate method may result in a loss of data (its
purpose is to trim the excess, after all). If you leave that off,
DataMgr will give you a more helpful error. You may have already known
this, but it seemed a good idea to bring it up since we are discussing
truncate.