CaNCaN Posted May 31, 2011 Share Posted May 31, 2011 Başlıkta belirtiğim gibi silme kodunda sorun yaşıyorum; [code] OleDbConnection bag = new OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0; Data Source=" + Application.StartupPath + "\\data2.mdb"); bag.Open(); int no = Convert.ToInt32(textBox6.Text); string sql = "delete from isciekle where no=" + no; OleDbCommand komut = new OleDbCommand(sql, bag); komut.ExecuteNonQuery(); MessageBox.Show("Veri Silindi"); OleDbDataAdapter da = new OleDbDataAdapter("select * from isciekle", bag); DataTable dt = new DataTable(); da.Fill(dt); dataGridView1.DataSource = dt; bag.Close(); bag.Close();[/code] Quote Link to comment Share on other sites More sharing options...
CaNCaN Posted June 1, 2011 Author Share Posted June 1, 2011 Güncel Quote Link to comment Share on other sites More sharing options...
akkayaonur Posted June 6, 2011 Share Posted June 6, 2011 [quote name='CaNCaN' date='31 May 2011 - 21:26 ' timestamp='1306877193' post='1021825'] Başlıkta belirtiğim gibi silme kodunda sorun yaşıyorum; [code] string sql = [color="#8B0000"]"delete from isciekle where no="[/color] + no; [/code] [/quote] Kodda Eksik Var.. [code] string sql= [color="#8B0000"]"delete from isciekle where no=[color="#2E8B57"]'[/color]"[/color] + no[color="#2E8B57"] + "'"[/color]; [/code] bu şekilde olması lazım Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.