Jump to content

C# Silme Kodunda Sıkıntı


CaNCaN
 Share

Recommended Posts

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]
Link to comment
Share on other sites

[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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...