當我嘗試使用ODP.NET執行一個創建過程時,我得到ORA-24344:編譯錯誤成功。但是,當我在SQL Developer中運行相同的語句時,它會成功編譯。有誰知道我需要改變以便讓我的程序編譯?這是一個字符集問題嗎?ODP.NET過程編譯
我使用Oracle 10g Express中,.NET 3.5 SP1,和ODP.NET 2.111.7.20(從Oracle.DataAccess.dll版)
[TestMethod]
public void OdpNet_CreateProcedure()
{
ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["ODP.NET"];
using (var con = new OracleConnection(settings.ConnectionString))
{
con.InfoMessage += new OracleInfoMessageEventHandler(con_InfoMessage);
con.Open();
var cmd = new OracleCommand();
cmd.Connection = con;
cmd.CommandText = @"
CREATE OR REPLACE PROCEDURE TABLE1_GET
(
P_CURSOR OUT SYS_REFCURSOR
)
IS
BEGIN
OPEN P_CURSOR FOR
SELECT *
FROM TABLE1;
END;";
cmd.ExecuteNonQuery(); // ORA-24344: success with compilation error
cmd.CommandText = @"ALTER PROCEDURE TABLE1_GET COMPILE";
cmd.ExecuteNonQuery(); // ORA-24344: success with compilation error
}
}
void con_InfoMessage(object sender, OracleInfoMessageEventArgs eventArgs)
{
System.Diagnostics.Debug.WriteLine(eventArgs.Message);
}
感謝您的答覆。奇怪的是,但仍然是一個要求! TABLE1_GET PROCEDURE PLS-00103:出現符號 「」 期待當下列中的一種: (;與AUTHID作爲集羣壓縮命令使用編譯的 封裝了外部確定性parallel_enable流水線 ERROR 103 MESSAGE_NUMBER>
–
Bobcat1506
2010-05-05 01:16:08