以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]加密用harddiskid为什么报错  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78743)

--  作者:chnfo
--  发布时间:2015/12/16 10:16:00
--  [求助]加密用harddiskid为什么报错
来源:另一种软件加密方式
用computerID就没事,如果把所有的computerID的地方换成HardDiskID,就报出错误来了

运行错误内容如下(截图麻烦,直接传内容了)
.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2015.11.2.1
错误所在事件:窗口,Reg,Button1,Click
详细错误信息:
System.ArgumentException: 无法设置列“Name”。此值违反了此列的 MaxLength 限制。
   在 System.Data.DataColumn.CheckMaxLength(DataRow dr)
   在 System.Data.DataColumn.CheckColumnConstraint(DataRow row, DataRowAction action)
   在 System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)
   在 System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
………………

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目44.rar
这是为什么呢?


--  作者:大红袍
--  发布时间:2015/12/16 10:43:00
--  

当你的字符过长,saveConfigeValue是不能保存的。你截取部分字符作为名字吧

 

SaveConfigValue("RegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegisterRegister", "123")


--  作者:大红袍
--  发布时间:2015/12/16 10:45:00
--  
最多是23个字符。