Results 1 to 2 of 2

Thread: The database in my application becomes read-only after i install

  1. #1

    Thread Starter
    Addicted Member MoE70's Avatar
    Join Date
    May 2006
    Posts
    185

    The database in my application becomes read-only after i install

    I've created a project in VB .NET. when i build it and run the .exe everything works fine but when i install it the database becomes read only. I've used the VB 'setup and deployment' project to make and installer and i also tried InstallShield but the occurs in both cases. i looked on google but can't find anything that makes sense atleast. i think the application can not create _log.LDF file. Anyone come across this problem before?

    error:
    System.Data.SqlClient.SqlException: Failed to update database "C:\........." because the database is read-only.
    Last edited by MoE70; Apr 23rd, 2010 at 07:31 PM.

  2. #2
    Fanatic Member
    Join Date
    Jun 2008
    Location
    Portland, OR, USA
    Posts
    659

    Re: The database in my application becomes read-only after i install

    How are you accomplishing the "install" of the database?

    DO you mean you are installing a vb app, and then Attaching a database to an existing SQL Server installation? Or is installing SQL Server part of your application SetUp?

    I have found that when I attach a database file created on a different installation of SQL Server, the database attaches, but is read-only. I have to manually change it to read-write in the properties window of SSMS.

    I am not well-enough versed in the intricacies of this, but I imagaine there is some SQL code one might execute after attaching a databse to reset this property.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width