Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ODAC提供程序出错,SQL在MSDAORA中运行正常_Sql_Oracle_Odp.net_Odac - Fatal编程技术网

ODAC提供程序出错,SQL在MSDAORA中运行正常

ODAC提供程序出错,SQL在MSDAORA中运行正常,sql,oracle,odp.net,odac,Sql,Oracle,Odp.net,Odac,如果我在MSDAORA OleDB提供程序上执行以下SQL,它运行正常 BEGIN MY_PACKAGE_NAME.MY_PROCEDURE_NAME('value1', 'value2'); EXECUTE IMMEDIATE 'CREATE TABLE MY_TABLE_NAME as select MY_ID ID, MY_NAME NAME from MY_OTHER_TABLE'; END; 但由于其他原因,我将其更改为Oracle.DataAccess

如果我在MSDAORA OleDB提供程序上执行以下SQL,它运行正常

BEGIN
MY_PACKAGE_NAME.MY_PROCEDURE_NAME('value1', 'value2');
EXECUTE IMMEDIATE 'CREATE TABLE MY_TABLE_NAME as select
     MY_ID ID,
     MY_NAME NAME
from
     MY_OTHER_TABLE';
END;
但由于其他原因,我将其更改为Oracle.DataAccess.dll,现在出现以下错误:

ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:

   begin case declare exit for goto if loop mod null pragma
   raise return select update while with <an identifier>
   <a double-quoted delimited-identifier> <a bind variable> <<
   close current delete fetch lock insert open rollback
   savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 52:
PLS-00103: Encountered the symbol "" when expecting one of the following:

   begin case declare end exception exit for goto if loop mod
   null pragma raise return select update while with
   <an identifier> <a double-quoted delimited-id
ORA-06550: line 8, column 60:
PLS-00103: Encountered the symbol "" when expecting one of the following:

   begin case declare end exception exit for goto if loop mod
   null pragma raise return select update while with
   <an identifier> <a double-quoted delimited-id

替换命令文本中\r\n的,因为odp.net


也请提供你的.NET代码谢谢,我把vb.NET代码。此
OracleCommand
来自命名空间
Oracle.DataAccess.Client
sql = sql.Replace(Environment.NewLine, vbLf)
cmd = New OracleCommand(sql, conn)