错误:无法将参数值从SqlParameter转换为字符串 [英] Error : Failed to convert parameter value from a SqlParameter to a String

查看:350
本文介绍了错误:无法将参数值从SqlParameter转换为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我收到此错误,如何解决此错误.

我正在使用SqlHelper.cs并尝试使用回调方法构建异步数据访问
(片段5)在FillDataTable方法中填充数据表时,我遇到此错误.

参考网址:异步数据访问 [

Dear All,

I''m getting this error how resolve this error.

I''m using SqlHelper.cs and try to build asynchronous data access with callback method
(Fragment 5) at the time of filling data table in FillDataTable method i''m getting this error.

Reference url :Asynchronous Data Access[^]

please replay ASAP

Thanks & Regards,
yagnasri,

推荐答案

该参数必须是字符串,不是.该消息告诉您.如果您发布了代码,我们可以告诉您如何解决它
The parameter needs to be a string and it''s not. The message tells you that. If you posted code, we could tell you how to fix it


尝试将值放在对象中,然后在调试器中检查其类型.您还可以使用立即窗口并对返回的值进行gettype.
Try to put the value in an object, and then check its type when in the debugger. You can also use the immediate window and do a gettype on the value returned.


这篇关于错误:无法将参数值从SqlParameter转换为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆