winform中,使用openfileDialog而引起的“Unable to open the database file"
2012-03-01 03:09
746 查看
环境:vs C# winform
问题:openfileDialog打开时,系统报错“Unable to open the database file"
原因:由于sqlite的路径使用相对路径,当openfileDialog触发打开事件时默认路径改变,系统在当前openfileDialog打开的路径上找不到数据库而报错.
解决:
将openfileDialog的属性restoreDirectory的值设置为true
问题:openfileDialog打开时,系统报错“Unable to open the database file"
原因:由于sqlite的路径使用相对路径,当openfileDialog触发打开事件时默认路径改变,系统在当前openfileDialog打开的路径上找不到数据库而报错.
解决:
将openfileDialog的属性restoreDirectory的值设置为true
相关文章推荐
- Unable to open the physical file "F:\DATA\TestDB.mdf"
- winform正在使用dsoframer迅速"Unable to display the inactive document.Click here to reacitive the document."
- winform中使用dsoframer提示"Unable to display the inactive document.Click here to reacitive the document."
- Unable to open the physical file "d:\***.mdf". Operating system error 5: "5(Access is denied.)".
- Error code: 0x80004005 "The Microsoft Access database engine cannot open or write to the file &
- Q:Is there any way to define what the "Open Resource" dialog in Eclipse should show?
- 对使用"ALTER DATABASE BACKUP CONTROLFILE TO ''" 备份的控制文件的恢
- 解决:Unable to open the physical file "…….ldf". Operating system error 5: "5(拒绝访问。)".
- Ubuntu 10.04 HP LaserJet 无法打印 "**** Unable to open the initial device, quitting" 错误
- "The file you are trying to open, '[filename]', is in a different format" Excel Error
- 使用PHP中的库函数file_get_contents时出现Unable to find the wrapper "https"错误解决
- Unable to open the command file "E:\Samples\SampleApp\CC2530DB\..\.问题
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题
- AdventureWorksDW2008R2 attach: Unable to open the physical file. Operating system error 5: "5(Access is denied.)
- Error code: 0x80004005 "The Microsoft Access database engine cannot open or write to the file ''
- ORA-15025: could not open disk"...." ORA-27041: unable to open file Linux-x86_64 Error: 13: Permiss
- Error: unable to open database "BookStore.db": unable to open database file
- 使用exe程序加密解密,web.config时出错 ”Unable to save config to file...."
- Error while preforming database login with the "sqlserver" driver Unable to create...
- 使用TC调试c语言的时候运行时出现“unable to open input file 'cos.obj'