Attempted to read or write protected memory. When I call showDialog method of openfileDialog

前端 未结 3 447
北海茫月
北海茫月 2020-12-06 15:07

recently in my project when I call ShowDialog method of OpenFileDialog I get this error:

\"Attempted to read or write protected memory. Thi

3条回答
  •  粉色の甜心
    2020-12-06 15:43

    This is solved my problem. In Connection string add the OLE DB Services=-1 then its working.

    Like this:

    Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\DbTest\Test.accdb; OLE DB Services=-1
    

    Or as shown in this link

提交回复
热议问题