Is it safe to open the same .sdf database file from two WinMo different applications?

眉间皱痕 提交于 2019-12-11 08:47:57

问题


I have two Windows Mobile 6.1 applications that use the same MS SQL Server Mobile database. They might select and update data in the database at the same time. The database is kept in one .sdf file.

I don't know how the MS SQL mobile version works. The application loads following sql libraries: sqlceoledb30.dll, SQLCEER30EN.DLL, sqlcese30.dll and sqlceqp30.dll.

It is safe to do this?

I suspect that above dlls allow one application to work with the database stored in .sdf but there is no separate SQL process which would allow several applications / processes to work with the same database.

Update: it seems that only SQL CE 3.5 supports that functionality. This is a related question.


回答1:


The issue here is not transactional support, but is concurrent connectivity support. SQL CE versions before 3.5 did not support multiple connections to the same database file. Now in 3.1, for example, there was nothing that enforced this limitation, and you could get some strange behavior if you did it. SQL CE 3.5 added support for multiple, cross-process connections to a single data file.



来源:https://stackoverflow.com/questions/265691/is-it-safe-to-open-the-same-sdf-database-file-from-two-winmo-different-applicat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!