不习惯ColdFusion的TAGS语法?那就用SCRIPT语法吧

来源:互联网 发布:工业建模软件 编辑:程序博客网 时间:2024/06/08 18:04

TAGS语法其实背后由FRAMEWORK完成了很多工作,非常简洁。但我还不是很习惯。好在COLDFUSION提供了SCRIPT语法,呵呵,语法惯例和C#一样的。舒服了。TAGS语法继续学习,要适应啊。写一段用SCRIPT语法做的存储过程获取数据的小片段

 

component displayname="sc"{public query function getAllEmployees(){var spService = new Storedproc();     spService.setDatasource("#application.getApplicationSettings().Datasource#");spService.setProcedure("spgetAllEmployees");spService.addProcResult(name="rs2",resultset=2);result = spService.execute();return result.getProcResultSets().rs2;}}


 

没有<cfcomponent 没有<cfset 没有<cfstoredproc 大笑

 

动态语言用起来真舒服 羡慕

 

 

 

 

 

原创粉丝点击