我正在编写一个SQL存储过程,有一个输入参数是必需的.当在过程开始时参数为null并终止过程时,如何输出文本错误消息?
IF NULLIF(@P_Currentperiod, '') IS NULL
BEGIN
--????
RETURN
END
ELSE
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感激!
当我们编译一个应用程序并将其依赖的编译dll放在exe文件的同一文件夹中时,应用程序运行应该没有任何问题。但是为什么我们还需要使用regsvr32命令来注册那些依赖的dll呢?我在这里迷路了。
我写了一个将字符串转换为double的方法,这是代码
public double convertToDouble(string number)
{
string temp = number;
if (number.Contains("x"))
{
int locationE = number.IndexOf("x");
string exponent = number.Substring(locationE + 5, number.Length - (locationE + 5));
temp = number.Substring(0, locationE - 1) + "E" + exponent;
}
return Convert.ToDouble(temp);
}
Run Code Online (Sandbox Code Playgroud)
但是如果临时变量作为 null 或空字符串传入,则转换将失败。我怎么能写这部分。