Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sébastien Richer 194 posts 430 karma points
    Sep 12, 2012 @ 19:26
    Sébastien Richer
    0

    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!

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Sep 12, 2012 @ 22:13
    Jan Skovgaard
    0

    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

  • Sébastien Richer 194 posts 430 karma points
    Sep 12, 2012 @ 22:27
    Sébastien Richer
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft