Upgraded to Visual C# Express 2005 SP1, can no longer persist data inSQL Server Express

Discussion in 'Microsoft C# .NET' started by hardieca@hotmail.com, Mar 11, 2008.

  1. Guest

    Hi,

    After upgrading C# Express 2005, none of my apps will persist data to
    SQL Server Express (have not yet applied the Service
    Pack...downloading now).

    While the application is running, I can access the data I have tried
    to save in the database, but as soon as I stop and restart the
    application, the data disappears. It is like my entire application is
    wrapped in a TransactionScope that does not get committed (and no, I'm
    not using transactions...)

    I even downloaded a couple starter kits from Microsoft, and data is
    not being persisted in them either. I have tried inserting data with
    inline SQL, stored procedures, and the starter kits are using custom
    datasets, and the data keeps disappearing once the application is
    stopped.

    Anyone have any ideas? I tried googling for relevant information, no
    joy.

    C.
     
    , Mar 11, 2008
    #1
    1. Advertisements

  2. Re: Upgraded to Visual C# Express 2005 SP1, can no longer persistdata in SQL Server Express

    wrote:
    > Hi,
    >
    > After upgrading C# Express 2005, none of my apps will persist data to
    > SQL Server Express (have not yet applied the Service
    > Pack...downloading now).
    >
    > While the application is running, I can access the data I have tried
    > to save in the database, but as soon as I stop and restart the
    > application, the data disappears. It is like my entire application is
    > wrapped in a TransactionScope that does not get committed (and no, I'm
    > not using transactions...)
    >
    > I even downloaded a couple starter kits from Microsoft, and data is
    > not being persisted in them either. I have tried inserting data with
    > inline SQL, stored procedures, and the starter kits are using custom
    > datasets, and the data keeps disappearing once the application is
    > stopped.
    >
    > Anyone have any ideas? I tried googling for relevant information, no
    > joy.
    >
    > C.


    Just off the top of my head, could it be that your database file is
    copied to the bin directory each time you build/run, so that you always
    start with the same version?

    If your database file is part of your C# project, check its properties
    and see if it is set to be copied to the output directory every time,
    and try to set it to only copy it if its newer.

    --
    Lasse Vågsæther Karlsen
    mailto:
    http://presentationmode.blogspot.com/
    PGP KeyID: 0xBCDEA2E3
     
    Lasse Vågsæther Karlsen, Mar 12, 2008
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Paul Aspinall
    Replies:
    7
    Views:
    348
    Paul Aspinall
    Dec 2, 2005
  2. Paul Aspinall
    Replies:
    0
    Views:
    258
    Paul Aspinall
    Dec 2, 2005
  3. Paul Aspinall

    Sync SQL Server Express 2005 and SQL Server Mobile 2005.

    Paul Aspinall, Dec 4, 2005, in forum: Microsoft C# .NET
    Replies:
    2
    Views:
    342
    Cowboy \(Gregory A. Beamer\)
    Dec 5, 2005
  4. kmich
    Replies:
    10
    Views:
    590
    Thomas T. Veldhouse
    Jul 13, 2006
  5. GetTheMonkey

    Visual C# 2005 Express/ XNA Game Studio Express problem

    GetTheMonkey, Sep 1, 2006, in forum: Microsoft C# .NET
    Replies:
    2
    Views:
    516
    GetTheMonkey
    Sep 1, 2006
  6. Iwan Petrow

    sql server 2005, visual studio 2005, Debug database?

    Iwan Petrow, Oct 20, 2006, in forum: Microsoft C# .NET
    Replies:
    1
    Views:
    363
    chanmm
    Oct 20, 2006
  7. Franky

    Visual Studio® 2005 SP1

    Franky, Dec 21, 2006, in forum: Microsoft C# .NET
    Replies:
    3
    Views:
    237
    Marc Gravell
    Dec 21, 2006
  8. Guest
    Replies:
    11
    Views:
    364
    Martin Carpella
    Feb 15, 2007
Loading...