-- 作者:xianzheng
-- 发布时间:2015/11/2 13:31:00
-- [求助]
DataRowAdding代码:e.DataRow("操作员")=_UserName,这个在老板本是可以的,但新版报错,为什么?
.NET Framework 版本:2.0.50727.3053 Foxtable 版本:2015.11.2.1 错误所在事件:表,基础资料,DataRowAdding 详细错误信息: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for \'UserCode\' threw an exception. ---> System.NotSupportedException: No devices of the category at DirectX.Capture.FilterCollection.getFilters(Guid category) at DirectX.Capture.FilterCollection..ctor(Guid category) at DirectX.Capture.Filters..ctor() at UserCode..cctor() --- End of inner exception stack trace --- at UserCode.DataRowAdding(DataRowEventArgs e) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Foxtable.DataTable.Oo00o O (Object A_0, DataTableNewRowEventArgs A_1)
|
-- 作者:大红袍
-- 发布时间:2015/11/2 14:32:00
--
你搜索一下哪里写了 New DCap.Filters()
加上 try catch 即可
比如原来 _Cams = New DCap.Filters()
改成
Try _Cams = New DCap.Filters() Catch
MessageBox.Show("未找到摄像头","提示")
return End Try
|