ALTER PROCEDURE dbo.Psave @id int,@name nchar(10) AS insert into Table1 values(@id,@name) RETURN
private void button2_Click(object sender, System.EventArgs e) { string _cs = @"Data Source=nafiseh-pc;Database=testlinq;Integrated Security = true;"; using (DataClasses1DataContext dc = new DataClasses1DataContext(_cs)) { dc.DeferredLoadingEnabled = false; try { dc.Connection.Open(); dc.Transaction = dc.Connection.BeginTransaction(); dc.pSave(6,"k"); }//end try finally { if (null != dc.Connection && dc.Connection.State != System.Data.ConnectionState.Closed) { dc.Connection.Close(); } }//end finaly }//end using }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)