Using SQLCE, website says "Database already opened by a different user."
Hello,
I moved my database from SQL server to a Compace edition. I use SQL Server Compact Toolbox in my VS 2012. Now when I have the connection running in my VS, accessing my site results in the following error message:
System.Data.SqlServerCe.SqlCeException: Database already opened by a different user.
Then If I close my connection in VS, the site now works. The same thing occurs the other way around, if my site is connected, I can't connect with the Toolbox, I have to stop my website in IIS. Which is quite inconvenient.
I've seen this too when running a site using webmatrix and wanting to access the database in webmatrix. Then I need to stop the site in order to have a look at the database. Don't know if this can be fixed somehow but I don't think it's ideal to be developing against a CE SQL database if you need to do a lot of custom DB stuff. Not that it's something I have done a lot of myself but my gut feeling tells me you're better of using MSSQL (express edition should do for dev purposes).
Yeah I see what you mean, well I normally don't play around in the DB so much, but my other issue with the MNTP had me running around in the tables looking for quirky things. I read that it might have something to do with "File access" and settings to the application pool. Something in the lines of network service would "lock" the file or etc. But this is a bit off my area of expertise so :(
Using SQLCE, website says "Database already opened by a different user."
Hello,
I moved my database from SQL server to a Compace edition. I use SQL Server Compact Toolbox in my VS 2012. Now when I have the connection running in my VS, accessing my site results in the following error message:
System.Data.SqlServerCe.SqlCeException: Database already opened by a different user.
Then If I close my connection in VS, the site now works. The same thing occurs the other way around, if my site is connected, I can't connect with the Toolbox, I have to stop my website in IIS. Which is quite inconvenient.
Has anyone crossed a similar issue?
Thank you!
Hi Sébastian
I've seen this too when running a site using webmatrix and wanting to access the database in webmatrix. Then I need to stop the site in order to have a look at the database. Don't know if this can be fixed somehow but I don't think it's ideal to be developing against a CE SQL database if you need to do a lot of custom DB stuff. Not that it's something I have done a lot of myself but my gut feeling tells me you're better of using MSSQL (express edition should do for dev purposes).
/Jan
Yeah I see what you mean, well I normally don't play around in the DB so much, but my other issue with the MNTP had me running around in the tables looking for quirky things. I read that it might have something to do with "File access" and settings to the application pool. Something in the lines of network service would "lock" the file or etc. But this is a bit off my area of expertise so :(
Thanks for the reply
is working on a reply...