Can't Update Database

  • Thread starter Thread starter Jonathan Wood
  • Start date Start date
J

Jonathan Wood

I'm still plugging along trying to learn .NET and all the database stuff.

I've now had two separate book database sample applications I've typed into
my computer. One was a desktop application and the other was a Web
application. Both appear to work just fine. But, in both cases, when I
update the date, it silently refreshes with the old data, unchanged. Could
there be some system setting hidden away somewhere that would prevent me
from updating databases via ASP.NET?

I'm using pretty much the default installation of Visual Studio 2005
Professional Edition. My server is SQL Express. I'm able to modify tables
and add data from within Visual Studio (running as administrator on Vista).
I went into SQL Server Configuration Manager but couldn't see anything
relevant there. (Protocols for SQLEXPRESS: Shared Memory=Enabled, Named
Pipes=Disabled, TCP/IP=Disabled, VIA=Disabled.)

Does anyone have any suggestions?

Thanks.

Jonathan
 
You got me. It states "The behavior of the Copy to Output Directory property
does not apply to web or C++ projects." That seems to suggest it wouldn't be
an issue for Web applications but I really couldn't make heads or tails of
it.

Jonathan
 
Okay, turn on the Profiler and watch what SQL Server is being asked to
execute. If you see UPDATE statements getting run, the data is changing. If
not, you might not be committing the changes to the local DataTable (see
EndEdit). Of course there might be a number of other things going wrong...

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
 
Back
Top