求助X3内执行SQL语句
<P>我想在X3中运行我的ORACLE存储过程TEST(参数1,参数2)。关于执行SQL语句的例程是这样的:</P><P class=a style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 0cm; mso-char-indent-count: 0"><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT size=3><FONT face=宋体>Local char Request(255)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P><P class=a style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 0cm; mso-char-indent-count: 0"><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT size=3><FONT face=宋体>Request = “Select sum(DLRATI) as VDLRATI from SORDER where BPCORD_0=’AN<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chmetcnv w:st="on" TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="905" UnitName="’">905’</st1:chmetcnv>”<o:p></o:p></FONT></FONT></SPAN></P><P class=a style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 0cm; mso-char-indent-count: 0"><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT size=3><FONT face=宋体>For (Decimal VDLRATI) from “<st1:chmetcnv w:st="on" TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="3" UnitName="”">3”</st1:chmetcnv> Sql Request as [SOH]<o:p></o:p></FONT></FONT></SPAN></P><P class=a style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 0cm; mso-char-indent-count: 0"><FONT size=3><FONT face=宋体><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><SPAN style="mso-spacerun: yes"> </SPAN>Infbox num$([F:SOH]VDLRATI)<SPAN style="mso-spacerun: yes"> </SPAN>#---- </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">显示汇总金额</SPAN></FONT><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><o:p></o:p></SPAN></FONT></P><P class=a style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 0cm; mso-char-indent-count: 0"><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT size=3><FONT face=宋体>Next<o:p></o:p></FONT></FONT></SPAN></P><P>我改成了这样:</P><P> REQUEST="BEGIN TEST(参数1,参数2); END;"</P><P> For (Char DIAM1) From "3" Sql REQUEST As [DMT] <BR><BR> Next</P><P>那句话在PLSQL中执行一切正常。可是在X3中却直接退出,没有任何错误提示。需要的话我可以把存储过程发给你。哪位有相关调用ORACLE存储过程的经验。麻烦不吝告知。谢谢!</P>Re:求助X3内执行SQL语句
X3的SQL执行并不是通过直接写SQL语句来运行的,runtime会将X3的4GL中的SQL指令编译成可执行的语句交由DBMS处理。所以从X3中直接调用存储过程可能会有一些困难,但是我可以帮你问问。Re:求助X3内执行SQL语句
谢谢,期待Re:求助X3内执行SQL语句
<P>知道原因了</P><P>For...From...Sql是带返回值的执行SQL语句的用法,一般用于直接select什么</P><P>我的存储过程不带返回值 可以直接用Execsql</P><P> </P>Re:求助X3内执行SQL语句
多谢分享经验。页:
[1]