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

H

hardieca

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.
 
L

Lasse Vågsæther Karlsen

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.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top