解决在coldfusion执行oracle块的问题
来源:互联网 发布:mac一般什么时候发布 编辑:程序博客网 时间:2024/06/06 04:46
原地址:http://awads.net/wp/2005/07/25/oracle-plsql-in-cfquery/
Oracle PLSQL in CFQUERY
Sometimes, you may want to execute an anonymous PL/SQL block directly from within the CFQUERY
tag instead of calling a stored procedure or function. So you write this (simplified) code in your ColdFusion template:
<cfquery name="q" datasource="yourDSN"> declare x number; begin x := 0; end;</cfquery>
Only to get the following error when executing the above code:
Error Executing Database Query. [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 8: PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure ...
The workaround is to put the PL/SQL code in a ColdFusion variable and use the variable inside the CFQUERY
tag:
<cfset variables.plsql = " declare x number; begin x := 0; end;"><cfquery name="q" datasource="yourDSN"> #variables.plsql#</cfquery>
The above works like a charm!
0 0
- 解决在coldfusion执行oracle块的问题
- oracle创建触发器的脚本在sqlplus中执行不了问题的解决
- 代码块的执行问题
- ColdFusion 的DNS缓存问题
- 关于Oracle存储过程执行权限问题的解决
- oracle 作业过程 解决没有自动执行的问题
- 在oracle的PL程序块中执行一个varchar2类型变量中的sql 语句
- 解决MapReduce任务在windows本地执行的NullPointerException问题
- 遇到一个问题,我想解决在对话框滑动块的问题/
- 在coldfusion里,字段名有空格如何解决?
- oracle直接执行程序块
- Oracle大文本在ASP中存取问题的解决
- Oracle大文本在ASP中存取问题的解决
- 解决mybatis在oracle中null的问题
- 在Oracle的网络结构中解决连接问题
- 解决slideDown()、slideUp()执行结束后才执行下一次,导致鼠标离开后很久动画依然在执行的问题
- oracle 坏块问题
- static块的执行
- GDB调试工具学习笔记
- URL中的#
- jQuery判断文件上传类型
- tzpc-arm trust zone
- 源品汇追溯系统的优势
- 解决在coldfusion执行oracle块的问题
- iOS中的懒加载lazyLoad
- LeetCode OJ - Longest Valid Parentheses
- 差一错误
- Chapter1 Introduction to Databases
- Linux shell脚本编写基础
- ubuntu 下 apt tomcat的几个问题
- 文件操作
- 氙灯点亮的问题,拿下了