问题描述
Hello Guys,
早上,我遇到了棘手的问题,即我使用的是Asp.net 4(VS 2010)和Mysql(5.5)
我的项目。在Mysql中创建了三个表并通过服务器资源管理器将它连接到.Net现在我可以看到这三个表,请注意到现在还没有编写任何代码但是尽快我右键单击表名并单击刷新突然我收到一个错误框说
无法将System.DbNull类型的对象强制转换为System.string请不要使用示例数据库代码我如何创建表格
Hello Guys,
morning, i got stuck with of the freaking problem i.e. am using Asp.net 4 (VS 2010) and Mysql(5.5)
for one of My project. created three tables in Mysql and connected it to .Net via server explorer
now i can see those three tables , please note have not written any code till now but as soon as i right click on table name and click refresh suddenly i get a error box saying
"Unable to cast object of type System.DbNull to System.string" and please not the sample DB code how i created my table
CREATE TABLE admintable( adminid int NOT NULL primary key,
password varchar(30));
这里的图像是
这是我在这里提到过的一张桌子,请有任何帮助我解决这个问题,因为我的时间不多了请
问候
sam
here is the image <img src="http://i.imgur.com/cuv0XsY.jpg?1" alt="" title="Hosted by imgur.com" />
this is one table which i have mentioned here, please any out there help me to resolve this as am running out of time please
regards
sam
推荐答案
这篇关于如何解决“无法将system.Dbnull转换为类型System.String”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!