c# - Saving Insertions into a database -


i updating database using c# & sql. when insert value table exists in table until close connection. how save values inserted? here code using:

        conn = new system.data.sqlclient.sqlconnection();         conn.connectionstring = "data source=.\\sqlexpress;  attachdbfilename=|datadirectory|\\unmapped.mdf;integrated security=true;user instance=true";                     string sql = "insert unmappedteamstable values ('value1', 'value2', 'pw')";         sqlcommand insertcommand = new sqlcommand(sql, conn);          conn.open();         insertcommand.executenonquery();         conn.close(); 

thanks

set brakepoint , see if query running or not.

i think code not executing properly.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -