SQL Server Express edition - read-only database? -


i'm having strange problem fresh install have of sql server 2008 express edition (yeah it's bit old now, whatever). when connect via sql server management studio, can both read , edit data (update or insert), when connect via web application's data access layer, uses sqlconnection , sqlcommand try , update , insert data in tables, no changes occur in database. strange thing code runs if no error had occurred though; no exceptions thrown, , update statement causes sqlcommand.executenonquery return 1, indicating supposedly 1 row has been updated. however, hasn't. application can, however, read data database via select statements.

does have idea what's going on here? tried tracing sql server using expressprofiler, , output seemed indicate update should have occurred:

exec sp_executesql n'update match set ticketssold=@ticketssold matchid=@matchid',n'@matchid int,@ticketssold int',@matchid=1,@ticketssold=1234 go 

yet ticketssold stays @ same value (123) @ before, , not update 1234. there kind of "silent" read-only mode sql server 2008 express running in? i'm baffled why database isn't being updated.

by way, proper sql server database created in ssms, not attached mdf file resides in same directory web application. database not set "read-only" in database options, , i'm pretty sure user web application logging in has read/write permission on mdf file; logging in same user logging in using ssms - integrated windows security - , able update/insert user via ssms.

thanks shf301 in comments - creating transaction forgetting call .commit before end of using block. :-d put in , works.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -