求助:一个怪问题,已经调试了四天了。

ejiue 2004-04-12 01:44:32
程序使用access数据库。OleDbConnection。

在2000下升级了IE,安装了Framework和MDAC后能正常运行。
(测试过三台机子均正常)

但是在98下,在两台安装过“其他乱七八糟的程序”的机子上能正常运行。
在两台没有安装过“其他程序”的机子上会出现一个错误。


注意OleDbConnection.Open()连接正常。
错误现象为:
当第一个出现的DataGrid从数据库读数据时(使用OleDbDataAdapter),
会出现一个异常:Illegal characters in path.
然后DataGrid变成一个大红叉,背景全白。
我点击这个DataGrid时,发现大红叉和全白的背景后有数据库表里的数据。
也就是说,数据已经读出来了。但是被白色背景遮住了。
点击DataGrid会发现白色背景后面的数据。

更怪的是,就是显示第一个DataGrid(不论是哪个DataGrid)会出现这个问题。
此后所有的DataGrid显示时都不会出现这个问题。

************** Exception Text **************
System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
at System.AppDomainSetup.get_ConfigurationFile()
at System.Configuration.DefaultConfigurationSystem.get_AppConfigPath()
at System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.Init()
at System.Configuration.ConfigurationSettings.SetConfigurationSystem(IConfigurationSystem configSystem)
at System.Configuration.ConfigurationSettings.GetConfig(String sectionName)
at System.Diagnostics.DiagnosticsConfiguration.GetConfigTable()
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.DiagnosticsConfiguration.get_SwitchSettings()
at System.Diagnostics.Switch.Initialize()
at System.Diagnostics.Switch.get_SwitchSetting()
at System.Diagnostics.TraceSwitch.get_TraceVerbose()
at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g, Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32 numVisibleColumns, Boolean alignToRight)
at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
----------------------------------------
HWT880
Assembly Version: 1.0.1563.22317
Win32 Version: 1.0.1563.22317
CodeBase: file:///C:/PROGRAM%20FILES/OULIAN/880话务台/HWT880.EXE
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.3300.0__b77a5c561934e089/system.data.dll
----------------------------------------
AxInterop.MSCommLib
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/PROGRAM%20FILES/OULIAN/880话务台/AxInterop.MSCommLib.DLL
----------------------------------------
Interop.MSCommLib
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/PROGRAM%20FILES/OULIAN/880话务台/Interop.MSCommLib.DLL
----------------------------------------
System.Xml
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.3300.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.3300.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>


已经调试了四天了,装了七台机子,还找不出问题,请大家帮忙。万分感谢!!!
...全文
199 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
ejiue 2004-04-24
  • 打赏
  • 举报
回复
升级到Framework1.1版本,OK。我以前发现的一个DataGrid的Bug也修复了。
忙了一个星期,却是这么个结果。
大家快升级吧。
xiangyangsunboy1 2004-04-15
  • 打赏
  • 举报
回复
up
ejiue 2004-04-15
  • 打赏
  • 举报
回复
还没找到是什么问题。
自己up一下,等解决了再揭贴吧。
ejiue 2004-04-13
  • 打赏
  • 举报
回复
我自己有点眉目了。大家再帮我想想看。
marvelstack 2004-04-13
  • 打赏
  • 举报
回复
楼主的DataGrid里面是不是有图片列,这个是填充引起的问题。
ejiue 2004-04-13
  • 打赏
  • 举报
回复
up。
Firestone2003 2004-04-13
  • 打赏
  • 举报
回复
很奇怪,没有碰到这种情况!
hkwlk 2004-04-12
  • 打赏
  • 举报
回复
路径是否有非正常字符?全改为英文字符看看?
upingking 2004-04-12
  • 打赏
  • 举报
回复
你看看是不是有什么语言设置设置不对的地方。xp中有一次在区域设置中设置的成英语(英国)虽然界面上显示是中文,但老是提示数据库连接不上。
qazsw 2004-04-12
  • 打赏
  • 举报
回复
是不是文件路径错误,或者有中文也会有问题
polarlm 2004-04-12
  • 打赏
  • 举报
回复
果然够奇怪!
既然它的异常是Illegal characters in path
我想还是应该从程序中涉及到path的地方着手
magiclamp 2004-04-12
  • 打赏
  • 举报
回复
gz。
ejiue 2004-04-12
  • 打赏
  • 举报
回复
up。
IE已经升级了。
rye889 2004-04-12
  • 打赏
  • 举报
回复
可以升级98的IE试下

110,502

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧