“无法识别的引导格式"; [英] "Unrecognized Guid Format"
本文介绍了“无法识别的引导格式";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友
我遇到了问题,发生的错误是无法识别的Guid格式"
代码是
hi friends
i have suffering with the problem the error that i have occur is "Unrecognized Guid Format"
code is
public Int32 getprpcount(string userplan,string plan)
{
try
{
obj.conopen();
SqlCommand cmd = new SqlCommand("property_by_plan", obj.con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@userplan", SqlDbType.UniqueIdentifier).Value = new Guid(userplan);
cmd.Parameters.Add("@plan", SqlDbType.NVarChar, 50).Value = plan;
Int32 cnt = Convert.ToInt32(cmd.ExecuteScalar());
return cnt;
}
catch { return 0; }
}
推荐答案
"无法识别的引导格式"位于提供的字符串userplan
中,您必须检查其格式(或在此处报告其内容).
The ''Unrecognized Guid Format'' is in the supplied string userplan
, you have to check its format (or report its content here).
您需要使用
解析该String Guid
Hi ,
You need to parse that String Guid using
R_Address.CityId = Guid.ParseExact(uim.rcityid, "D");
像这样,您需要解析为Guid
最好的
Like this you need to parse into Guid
All the Best
这篇关于“无法识别的引导格式";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文