找不到Oracle 12c UTILS包

时间:2018-03-30 16:53:56

标签: oracle oracle12c

我已经在我的本地主机上安装了Oracle 12c(Win 10)但是当我编写任何程序或功能时,我无法调用utils包。我一直在11g中使用utils.convert_to_nvarchar2在另一台服务器上并成功编译了函数。请有人可以提供建议。

image here

1 个答案:

答案 0 :(得分:2)

using System; using System.Text.RegularExpressions; public class ValidationRules { // SSN Rules // Format 123-45-6789 private static readonly Regex regexSSNDashes = new Regex(@"^\d{3}[-]\d{2}[-]\d{4}$"); // Format 123456789 private static readonly Regex regexSSNNoDashes = new Regex(@"^\d{3}\d{2}\d{4}$"); /// <summary> /// Get error string if property is not in the specified formats. /// </summary> /// <param name="propertyName">The property being validated.</param> /// <param name="isRequired">Bool value if the property is required to be filled else may be null</param> /// <param name="allowDashFormat">Bool value if format 123-45-6789 is allowed.</param> /// <param name="allowNoDashFormat">Bool value if format 123456789 is allowed.</param> /// <returns>Returns custom string for error type specified if error exists, else returns null.</returns> public static string SSN(String propertyName, bool isRequired, bool allowDashFormat, bool allowNoDashFormat) { if (isRequired && String.IsNullOrWhiteSpace(propertyName)) { return "SSN required."; } if (!String.IsNullOrEmpty(propertyName) && !(allowDashFormat && regexSSNDashes.IsMatch(propertyName)) && !(allowNoDashFormat && regexSSNNoDashes.IsMatch(propertyName))) { return "Invalid SSN."; } return null; } } 看起来像是用户定义的打包过程;换句话说 - 就我所知 - 这不是一个内置的Oracle程序。

这意味着您应该从旧的11g数据库中获取其(包)代码并将其安装在新的12c数据库中。