int intCount;
Open();
strSql="select count(*) from ltnewstxt";//+table_name;
OracleCommand cmd=new OracleCommand(strSql,con);
intCount=(int)cmd.ExecuteScalar();
为什么会说:
System.InvalidCastException: 指定的转换无效。
Open();
strSql="select count(*) from ltnewstxt";//+table_name;
OracleCommand cmd=new OracleCommand(strSql,con);
intCount=(int)cmd.ExecuteScalar();
为什么会说:
System.InvalidCastException: 指定的转换无效。
解决方案 »
- 一个小问题~
- 在页面放几个ascx,写一方法使ascx下某些或者全部控件不可编辑?
- 急急急论坛过滤功能(做完论坛的高手进)只有25分了。全给了
- 及其郁闷的DropDownList数据邦定,怎么办呀?唧唧唧……
- asp.net2.0中GridView控件中日期显示列的问题
- datatable的问题??
- /////////哪位兄弟,知道如何使 TreeView 转换成 根在上面,子节点在下面/////////
- 插入数据后页面上反应不出来,是什么问题呢?
- 如何改变DataGrid中某个数据的显示!
- infragistics webdatagrid 过一段时间后不能显示
- 有一篇格式有点乱的文字,如何用程序整理成每行动30个字
- .net站点这些文件架是干什么用的?
改一下
object count = cmd.ExecuteScalar();
if(count!= System.DBNull.value)
intCount = Convert.toInt32(count);