你的sql脚本最后多了一个:/,把他去掉,就可以了!

解决方案 »

  1.   

    从sqlplus中保存的脚本,往往在最后多一个:/!!!!
      

  2.   

    OracleCommand command = conn.CreateCommand();
     command.CommandText   = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("CreateUser");Debug.WriteLine(command.CommandText);
    //设置断点看看得到的SQL语句有没有问题try
    {
        command.ExecuteNoQuery();//<----------出错,
    }
    catch (Exception ex)
    {
       Debug.WriteLine(ex.ToString());
    }
      

  3.   

    搞了半天,终于找到原因了,在脚本文件中的回车换行读入到string中成了\r\n,\r不被oracle,