Re: Upgraded to Visual C# Express 2005 SP1, can no longer persist data in SQL Server Express



hardieca@xxxxxxxxxxx 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:lasse@xxxxxxxxxxx
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
.



Relevant Pages

  • Re: Local datastore for visual basic .net aplication on a pda
    ... In other words, if you don't need to sync your datastore with the desktop, ... SqlServerCe is what you want. ... >> database file as an local datastore without the SQL server running? ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Getting 5105 error when I try to attach database
    ... check SQL Server does to detect if I'm accessing a database file through a ... database file over a network share anyway. ... >> activation error), it gives the same path that I gave it, and says that the ...
    (microsoft.public.sqlserver.server)
  • Upgraded to Visual C# Express 2005 SP1, can no longer persist data in SQL Server Express
    ... none of my apps will persist data to ... SQL Server Express (have not yet applied the Service ... application, the data disappears. ... I even downloaded a couple starter kits from Microsoft, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Local datastore for visual basic .net aplication on a pda
    ... >>> most of the database access controls and etc available on the full .net ... >>> framework arenīt available for the .net compact framework, so, so much ... >>> database file as an local datastore without the SQL server running? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: How can I check..
    ... from sysindexes s inner join sysfilegroups fg ... Wayne Snyder, MCDBA, SQL Server MVP ... community of SQL Server professionals. ... > How can I check which table is a part of this database file? ...
    (microsoft.public.sqlserver.server)