c# - Inserts to Database During Debugging Does Not Commit To The Actual Database -
sorry life of me can't figure out, i'm sure must setting within visual basic missing.
so have programme lets me insert values database , datagridview selects values showing me results of inserted records.
when debug programme looks great. inserts , shows in datagridview. problem close programme records disappear. when come in programme 1 time again not there. when examine actual database values didn't commit.
what confuses me working fine yesterday , haven't touched of visual basic settings have no thought causing problem.
thank in advance of help.
edit
so figured out because property of database named "copy output" set "copy always" , setting "copy if newer" fixed problem. seeing visual studio making changes own re-create of database within debug/bin folder. there anyway create commit actual database instead of going around that?
here connection string:
<add name="sa_dbconnectionstring" connectionstring="data source=.\sqlexpress;attachdbfilename="|datadirectory|\sa db.mdf";integrated security=true;user instance=true; multipleactiveresultsets=true" providername="system.data.sqlclient" />
c# sql database visual-studio-2010 settings
No comments:
Post a Comment