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?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Aspinall
    Replies:
    7
    Views:
    222
    Paul Aspinall
    Dec 2, 2005
  2. Paul Aspinall
    Replies:
    0
    Views:
    168
    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:
    235
    Cowboy \(Gregory A. Beamer\)
    Dec 5, 2005
  4. kmich
    Replies:
    10
    Views:
    316
    Thomas T. Veldhouse
    Jul 13, 2006
  5. Iwan Petrow

    sql server 2005, visual studio 2005, Debug database?

    Iwan Petrow, Oct 20, 2006, in forum: Microsoft C# .NET
    Replies:
    1
    Views:
    255
    chanmm
    Oct 20, 2006
Loading...

Share This Page